diff --git a/main.go b/main.go index 5c9f115..7463d1f 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "time" "fyne.io/fyne/v2/app" + "fyne.io/fyne/v2/theme" "github.com/20after4/configdir" "github.com/zalando/go-keyring" ) @@ -28,6 +29,7 @@ func main() { } fyneApp := app.New() + fyneApp.Settings().SetTheme(theme.DarkTheme()) mainWindow := ui.NewMainWindow(fyneApp, appname, myApp) // TODO: There is some race condition with running this initial startup diff --git a/ui/bottompanel.go b/ui/bottompanel.go index a942b42..17b8ac7 100644 --- a/ui/bottompanel.go +++ b/ui/bottompanel.go @@ -100,8 +100,9 @@ func NewBottomPanel(p *player.Player) *BottomPanel { _ = p.SetVolume(v) } - bp.container = container.New(newBottomPanelLayout(500, bp.NowPlaying, bp.Controls, bp.AuxControls), + main := container.New(newBottomPanelLayout(500, bp.NowPlaying, bp.Controls, bp.AuxControls), bp.NowPlaying, bp.Controls, bp.AuxControls) + bp.container = container.NewBorder(widgets.NewThickSeparator(), nil, nil, nil, main) return bp } diff --git a/ui/browsingpane.go b/ui/browsingpane.go index 8a2b040..bcc1fd6 100644 --- a/ui/browsingpane.go +++ b/ui/browsingpane.go @@ -57,7 +57,10 @@ func NewBrowsingPane(app *backend.App) *BrowsingPane { b.forward = widget.NewButtonWithIcon("", theme.NavigateNextIcon(), b.GoForward) b.curPage = &blankPage{} b.container = container.NewBorder( - container.NewHBox(b.back, b.forward, b.searchBar), + container.NewVBox( + container.NewHBox(b.back, b.forward, b.searchBar), + widgets.NewThickSeparator(), + ), nil, nil, nil, b.curPage) return b } diff --git a/ui/widgets/thickseparator.go b/ui/widgets/thickseparator.go new file mode 100644 index 0000000..95a1fcb --- /dev/null +++ b/ui/widgets/thickseparator.go @@ -0,0 +1,28 @@ +package widgets + +import ( + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/canvas" + "fyne.io/fyne/v2/theme" + "fyne.io/fyne/v2/widget" +) + +type ThickSeparator struct { + widget.BaseWidget + line canvas.Line +} + +func NewThickSeparator() *ThickSeparator { + t := &ThickSeparator{ + line: canvas.Line{ + StrokeWidth: 3, + StrokeColor: theme.DisabledColor(), + }, + } + t.ExtendBaseWidget(t) + return t +} + +func (t *ThickSeparator) CreateRenderer() fyne.WidgetRenderer { + return widget.NewSimpleRenderer(&t.line) +}