more light theme work: themed icon button, colors adj
This commit is contained in:
@@ -5,9 +5,9 @@ import (
|
||||
"supersonic/ui/controller"
|
||||
"supersonic/ui/layouts"
|
||||
myTheme "supersonic/ui/theme"
|
||||
"supersonic/ui/widgets"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/layout"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
@@ -67,11 +67,8 @@ 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)
|
||||
b.pageContainer = container.NewMax(
|
||||
canvas.NewRectangle(fyne.CurrentApp().Settings().Theme().Color(
|
||||
myTheme.ColorNamePageBackground, fyne.CurrentApp().Settings().ThemeVariant(),
|
||||
)),
|
||||
layout.NewSpacer())
|
||||
bkgrnd := widgets.NewThemedRectangle(myTheme.ColorNamePageBackground)
|
||||
b.pageContainer = container.NewMax(bkgrnd, layout.NewSpacer())
|
||||
b.settingsBtn = widget.NewButtonWithIcon("", theme.SettingsIcon(), func() {
|
||||
p := widget.NewPopUpMenu(b.settingsMenu,
|
||||
fyne.CurrentApp().Driver().CanvasForObject(b.settingsBtn))
|
||||
@@ -110,19 +107,19 @@ func (b *BrowsingPane) AddSettingsMenuItem(label string, action func()) {
|
||||
fyne.NewMenuItem(label, action))
|
||||
}
|
||||
|
||||
func (b *BrowsingPane) AddNavigationButton(iconRes fyne.Resource, action func()) {
|
||||
b.navBtnsContainer.Add(widget.NewButtonWithIcon("", iconRes, action))
|
||||
func (b *BrowsingPane) AddNavigationButton(iconName fyne.ThemeIconName, action func()) {
|
||||
b.navBtnsContainer.Add(widgets.NewThemedIconButton(iconName, "", action))
|
||||
}
|
||||
|
||||
func (b *BrowsingPane) DisableNavigationButtons() {
|
||||
for _, obj := range b.navBtnsContainer.Objects {
|
||||
obj.(*widget.Button).Disable()
|
||||
obj.(*widgets.ThemedIconButton).Disable()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *BrowsingPane) EnableNavigationButtons() {
|
||||
for _, obj := range b.navBtnsContainer.Objects {
|
||||
obj.(*widget.Button).Enable()
|
||||
obj.(*widgets.ThemedIconButton).Enable()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user