feat: add apply

This commit is contained in:
0xMRTT 2022-08-23 10:36:09 +02:00
parent bec601152c
commit 415ed4be2e

View file

@ -36,6 +36,13 @@ class GradiencePresetRow(Adw.ActionRow):
@Gtk.Template.Callback() @Gtk.Template.Callback()
def on_apply_button_clicked(self, *_args): def on_apply_button_clicked(self, *_args):
print("apply") print("apply")
self.app.load_preset_from_file(os.path.join(
os.environ.get("XDG_CONFIG_HOME",
os.environ["HOME"] + "/.config"),
"presets",
to_slug_case(self.name) + ".json",
))
@Gtk.Template.Callback() @Gtk.Template.Callback()
def on_name_entry_changed(self, *_args): def on_name_entry_changed(self, *_args):