add automatic preset load

This commit is contained in:
0xMRTT 2022-08-11 16:22:34 +02:00
parent 1b12e48624
commit 0324b95759
No known key found for this signature in database
GPG key ID: AC9E06BF3DECB6FB

View file

@ -96,9 +96,17 @@ class AdwcustomizerApplication(Adw.Application):
self.create_action("about", self.show_about_window)
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()