Skip to content

Commit

Permalink
[fyne_settings] adjust constant name
Browse files Browse the repository at this point in the history
  • Loading branch information
toaster committed Jun 14, 2024
1 parent 630e3d5 commit 50676be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/fyne_settings/settings/appearance.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
)

const (
themeNameDark = "dark"
themeNameLight = "light"
themeNameSystemLabel = "system default"
themeNameSystemSettings = ""
themeNameDark = "dark"
themeNameLight = "light"
themeNameSystem = ""
themeNameSystemLabel = "system default"
)

// Settings gives access to user interfaces to control Fyne settings
Expand Down Expand Up @@ -63,7 +63,7 @@ func (s *Settings) LoadAppearanceScreen(w fyne.Window) fyne.CanvasObject {
themeNames := []string{themeNameDark, themeNameLight}
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
themeNames = append(themeNames, themeNameSystemLabel)
if s.fyneSettings.ThemeName == themeNameSystemSettings {
if s.fyneSettings.ThemeName == themeNameSystem {
def = themeNameSystemLabel
}
}
Expand Down Expand Up @@ -107,7 +107,7 @@ func (s *Settings) LoadAppearanceScreen(w fyne.Window) fyne.CanvasObject {

func (s *Settings) chooseTheme(name string) {
if name == themeNameSystemLabel {
name = themeNameSystemSettings
name = themeNameSystem
}
s.fyneSettings.ThemeName = name

Expand Down Expand Up @@ -249,7 +249,7 @@ func (p *previewTheme) Color(n fyne.ThemeColorName, _ fyne.ThemeVariant) color.C
switch p.s.fyneSettings.ThemeName {
case themeNameLight:
variant = theme.VariantLight
case themeNameSystemSettings:
case themeNameSystem:
variant = internalapp.DefaultVariant()
}

Expand Down

0 comments on commit 50676be

Please sign in to comment.