mirror of
https://codeberg.org/scip/golsky.git
synced 2025-12-18 13:01:12 +01:00
fixed theme selection from menu, centralized theme def to 1 place
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user