Fixes by autopep8 action (#223)

This commit is contained in:
0xMRTT 2022-08-20 11:34:29 +02:00 committed by GitHub
commit ab1b365634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,7 @@ from .plugins_list import GradiencePluginsList
from cairosvg import svg2png
import os
@Gtk.Template(resource_path=f"{rootdir}/ui/window.ui")
class GradienceMainWindow(Adw.ApplicationWindow):
__gtype_name__ = "GradienceMainWindow"
@ -114,9 +115,12 @@ class GradienceMainWindow(Adw.ApplicationWindow):
self.monet_image_file = self.monet_image_file.get_path()
if self.monet_image_file.endswith(".svg"):
with open(self.monet_image_file, "rb") as svg_img:
self.monet_image_file = os.path.join(os.environ.get("XDG_RUNTIME_DIR"), "gradience_bg.png")
svg2png(bytestring=svg_img.read(),write_to=self.monet_image_file)
self.monet_image_file = os.path.join(
os.environ.get("XDG_RUNTIME_DIR"), "gradience_bg.png")
svg2png(
bytestring=svg_img.read(),
write_to=self.monet_image_file)
self.monet_img = Image.open(self.monet_image_file)
basewidth = 64
wpercent = (basewidth / float(self.monet_img.size[0]))