Match window border color to app theme rather than OS theme (#958)

* MacOS: match window chrome to app light/dark mode when app setting is different from OS

* match window border to app theme on Windows
This commit is contained in:
Drew Weymouth
2026-06-24 13:46:09 -07:00
committed by GitHub
parent 2774970ca8
commit 67623366f5
9 changed files with 139 additions and 0 deletions
+10
View File
@@ -115,6 +115,16 @@ func (m *MyTheme) ReloadThemeFile() {
m.loadedThemeFile = nil
}
func (m *MyTheme) AppearanceMode() AppearanceMode {
v := DefaultAppearance // default if config has invalid or missing setting
if slices.Contains(
[]string{string(AppearanceLight), string(AppearanceDark), string(AppearanceAuto)},
m.config.Appearance) {
v = AppearanceMode(m.config.Appearance)
}
return v
}
func (m *MyTheme) Color(name fyne.ThemeColorName, defVariant fyne.ThemeVariant) color.Color {
// load theme file if necessary
if m.loadedThemeFile == nil || m.config.ThemeFile != m.loadedThemeFilename {