From 61d8d6916aed47cab4fa07bc9f47e117761448f0 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Mon, 1 May 2023 17:31:27 -0700 Subject: [PATCH] move ThemedRectangle to theme package --- ui/browsing/browsingpane.go | 3 +-- ui/{widgets/themed.go => theme/themedrectangle.go} | 2 +- ui/widgets/listheader.go | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) rename ui/{widgets/themed.go => theme/themedrectangle.go} (97%) diff --git a/ui/browsing/browsingpane.go b/ui/browsing/browsingpane.go index e9676bd..77c33f9 100644 --- a/ui/browsing/browsingpane.go +++ b/ui/browsing/browsingpane.go @@ -5,7 +5,6 @@ import ( "supersonic/ui/controller" "supersonic/ui/layouts" myTheme "supersonic/ui/theme" - "supersonic/ui/widgets" "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" @@ -67,7 +66,7 @@ func NewBrowsingPane(app *backend.App) *BrowsingPane { b.forward = widget.NewButtonWithIcon("", theme.NavigateNextIcon(), b.GoForward) b.reload = widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), b.Reload) b.app.PlaybackManager.OnSongChange(b.onSongChange) - bkgrnd := widgets.NewThemedRectangle(myTheme.ColorNamePageBackground) + bkgrnd := myTheme.NewThemedRectangle(myTheme.ColorNamePageBackground) b.pageContainer = container.NewMax(bkgrnd, layout.NewSpacer()) b.settingsBtn = widget.NewButtonWithIcon("", theme.SettingsIcon(), func() { p := widget.NewPopUpMenu(b.settingsMenu, diff --git a/ui/widgets/themed.go b/ui/theme/themedrectangle.go similarity index 97% rename from ui/widgets/themed.go rename to ui/theme/themedrectangle.go index 26d7e13..663274f 100644 --- a/ui/widgets/themed.go +++ b/ui/theme/themedrectangle.go @@ -1,4 +1,4 @@ -package widgets +package theme import ( "fyne.io/fyne/v2" diff --git a/ui/widgets/listheader.go b/ui/widgets/listheader.go index ccf21b3..8935309 100644 --- a/ui/widgets/listheader.go +++ b/ui/widgets/listheader.go @@ -3,6 +3,7 @@ package widgets import ( "log" "supersonic/ui/layouts" + myTheme "supersonic/ui/theme" "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" @@ -41,7 +42,7 @@ func NewListHeader(cols []ListColumn, layout *layouts.ColumnsLayout) *ListHeader for i, _ := range l.columnVisible { l.columnVisible[i] = true } - l.container = container.NewMax(NewThemedRectangle(theme.ColorNameBackground), l.columnsContainer) + l.container = container.NewMax(myTheme.NewThemedRectangle(theme.ColorNameBackground), l.columnsContainer) l.ExtendBaseWidget(l) l.buildColumns() return l