Fix css not being loaded in flatpak

This commit is contained in:
Bernd Schoolmann 2023-12-28 11:36:23 +01:00
parent c1da0f1802
commit faf66da833
No known key found for this signature in database

View File

@ -295,8 +295,10 @@ def show_login():
dialog.set_modal(True)
dialog.present()
isflatpak = os.path.exists("/.flatpak-info")
pathprefix = "/app/bin/" if isflatpak else "./"
css_provider = Gtk.CssProvider()
css_provider.load_from_path("style.css")
css_provider.load_from_path(pathprefix+"style.css")
Gtk.StyleContext.add_provider_for_display(
Gdk.Display.get_default(),
css_provider,