Allow toggling color scheme via simulate action
This commit is contained in:
parent
878c4d357c
commit
ccb3d666f4
1 changed files with 6 additions and 0 deletions
|
|
@ -3265,6 +3265,12 @@ def simulate_color_scheme_preference_change(self, which: str) -> None:
|
|||
self.on_system_color_scheme_change('dark', False)
|
||||
case 'no_preference':
|
||||
self.on_system_color_scheme_change('no_preference', False)
|
||||
case 'toggle':
|
||||
match theme_colors.applied_theme:
|
||||
case 'light':
|
||||
self.on_system_color_scheme_change('dark', False)
|
||||
case _:
|
||||
self.on_system_color_scheme_change('light', False)
|
||||
case _:
|
||||
self.show_error(_('Unknown color scheme type'), _('{} is not a valid color scheme type').format(which))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue