mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-04-18 12:10:10 +08:00

* 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>
19 lines
436 B
Python
19 lines
436 B
Python
#!/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)
|