mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-10-06 01:27:54 +00:00
add automatic preset load
This commit is contained in:
parent
1b12e48624
commit
0324b95759
1 changed files with 11 additions and 3 deletions
14
src/main.py
14
src/main.py
|
@ -96,9 +96,17 @@ class AdwcustomizerApplication(Adw.Application):
|
||||||
self.create_action("about", self.show_about_window)
|
self.create_action("about", self.show_about_window)
|
||||||
|
|
||||||
self.reload_user_defined_presets()
|
self.reload_user_defined_presets()
|
||||||
self.load_preset_from_resource(
|
|
||||||
"/com/github/AdwCustomizerTeam/AdwCustomizer/presets/adwaita.json"
|
self.style_manager = Adw.StyleManager.get_default()
|
||||||
)
|
|
||||||
|
if self.style_manager.get_color_scheme() == Adw.ColorScheme.DARK:
|
||||||
|
self.load_preset_from_resource(
|
||||||
|
"/com/github/AdwCustomizerTeam/AdwCustomizer/presets/adwaita-dark.json"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.load_preset_from_resource(
|
||||||
|
"/com/github/AdwCustomizerTeam/AdwCustomizer/presets/adwaita.json"
|
||||||
|
)
|
||||||
|
|
||||||
self.win.present()
|
self.win.present()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue