Fixed custom CSS not resetting when loading presets without the custom CSS field

This commit is contained in:
ArtyIF 2022-07-25 11:18:32 +03:00
parent 0e5d5d011a
commit 470930db36
2 changed files with 3 additions and 2 deletions

View file

@ -10,8 +10,6 @@ i18n = import('i18n')
gnome = import('gnome')
subdir('data')
subdir('src')
subdir('po')

View file

@ -193,6 +193,9 @@ class AdwcustomizerApplication(Adw.Application):
self.palette = preset["palette"]
if "custom_css" in preset:
self.custom_css = preset["custom_css"]
else:
for app_type in self.settings_schema["custom_css_app_types"]:
self.custom_css[app_type] = ""
for key in self.variables.keys():
if key in self.pref_variables:
self.pref_variables[key].update_value(self.variables[key])