mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
Fix flatpak not using dark theme (#8964)
* Create set-dark-theme-variant.py * Update entrypoint * Update io.github.softfever.OrcaSlicer.yml * Create uses-dark-theme.py * Update MPFR to 4.2.2 --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com> Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
18
flatpak/uses-dark-theme.py
Normal file
18
flatpak/uses-dark-theme.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk as gtk
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
forced = os.environ.get('ORCA_SLICER_DARK_THEME', 'false') == 'true'
|
||||
settings = gtk.Settings.get_default()
|
||||
prefer_dark = settings.get_property('gtk-application-prefer-dark-theme')
|
||||
|
||||
if not forced and not prefer_dark:
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(0)
|
||||
Reference in New Issue
Block a user