mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-10-06 09:37:52 +00:00
Fixes by autopep8 action (#225)
This commit is contained in:
commit
e2d64779f3
1 changed files with 6 additions and 6 deletions
|
@ -105,9 +105,11 @@ class GradienceMainWindow(Adw.ApplicationWindow):
|
||||||
def get_default_wallpaper(self):
|
def get_default_wallpaper(self):
|
||||||
background_settings = Gio.Settings("org.gnome.desktop.background")
|
background_settings = Gio.Settings("org.gnome.desktop.background")
|
||||||
if self.style_manager.get_dark():
|
if self.style_manager.get_dark():
|
||||||
self.monet_image_file = background_settings.get_string("picture-uri-dark")
|
self.monet_image_file = background_settings.get_string(
|
||||||
|
"picture-uri-dark")
|
||||||
else:
|
else:
|
||||||
self.monet_image_file = background_settings.get_string("picture-uri-dark")
|
self.monet_image_file = background_settings.get_string(
|
||||||
|
"picture-uri-dark")
|
||||||
print(self.monet_image_file)
|
print(self.monet_image_file)
|
||||||
|
|
||||||
self.monet_image_file = Gio.File.new_for_uri(self.monet_image_file)
|
self.monet_image_file = Gio.File.new_for_uri(self.monet_image_file)
|
||||||
|
@ -116,7 +118,6 @@ class GradienceMainWindow(Adw.ApplicationWindow):
|
||||||
self.monet_image_file = self.monet_image_file.get_path()
|
self.monet_image_file = self.monet_image_file.get_path()
|
||||||
self.on_apply_button()
|
self.on_apply_button()
|
||||||
|
|
||||||
|
|
||||||
def on_file_picker_button_clicked(self, *args):
|
def on_file_picker_button_clicked(self, *args):
|
||||||
self.monet_file_chooser_dialog.show()
|
self.monet_file_chooser_dialog.show()
|
||||||
|
|
||||||
|
@ -144,7 +145,6 @@ class GradienceMainWindow(Adw.ApplicationWindow):
|
||||||
self.monet_pref_group.set_description(
|
self.monet_pref_group.set_description(
|
||||||
_("Monet is an engine that generates Material Design 3 palette from backgrounds color."))
|
_("Monet is an engine that generates Material Design 3 palette from backgrounds color."))
|
||||||
|
|
||||||
|
|
||||||
self.apply_button = Gtk.Button()
|
self.apply_button = Gtk.Button()
|
||||||
self.apply_button.set_label(_("Apply"))
|
self.apply_button.set_label(_("Apply"))
|
||||||
self.apply_button.connect("clicked", self.on_apply_button)
|
self.apply_button.connect("clicked", self.on_apply_button)
|
||||||
|
@ -214,10 +214,10 @@ class GradienceMainWindow(Adw.ApplicationWindow):
|
||||||
self.monet_pref_group.add(self.monet_theme_row)
|
self.monet_pref_group.add(self.monet_theme_row)
|
||||||
|
|
||||||
self.content_monet.add(self.monet_pref_group)
|
self.content_monet.add(self.monet_pref_group)
|
||||||
|
|
||||||
def on_apply_button(self, *_args):
|
def on_apply_button(self, *_args):
|
||||||
if self.monet_image_file:
|
if self.monet_image_file:
|
||||||
|
|
||||||
if self.monet_image_file.endswith(".svg"):
|
if self.monet_image_file.endswith(".svg"):
|
||||||
drawing = svg2rlg(self.monet_image_file)
|
drawing = svg2rlg(self.monet_image_file)
|
||||||
self.monet_image_file = os.path.join(
|
self.monet_image_file = os.path.join(
|
||||||
|
|
Loading…
Reference in a new issue