fixed theme selection from menu, centralized theme def to 1 place

This commit is contained in:
2024-06-09 18:00:06 +02:00
parent 01cfaf3b78
commit 3a743a65e5
4 changed files with 72 additions and 65 deletions

View File

@@ -113,8 +113,15 @@ func (scene *SceneOptions) Init() {
scene.Config.ToggleWrap()
})
themenames := make([]string, len(THEMES))
i := 0
for name := range THEMES {
themenames[i] = name
i++
}
themes := NewCombobox(
[]string{"dark", "light"},
themenames,
scene.Config.Theme,
func(args *widget.ListComboButtonEntrySelectedEventArgs) {
scene.Config.SwitchTheme(args.Entry.(ListEntry).Name)