Skip to content

Commit b58c7b2

Browse files
authored
Merge pull request #263 from jbicha/gnome42-dark
Support GNOME 42 dark style preference
2 parents fbd64ad + b961ce8 commit b58c7b2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

system-config-printer.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@
4747
print ("This is a graphical application and requires DISPLAY to be set.")
4848
sys.exit (1)
4949

50+
# Optional dependency, requires libhandy >= 1.5
51+
gi.require_version('Handy', '1')
52+
try:
53+
from gi.repository import Handy
54+
Handy.init()
55+
# Support GNOME 42 dark mode
56+
Handy.StyleManager.get_default().set_color_scheme(Handy.ColorScheme.PREFER_LIGHT)
57+
except:
58+
pass
59+
5060
def show_help():
5161
print ("\nThis is system-config-printer, " \
5262
"a CUPS server configuration program.\n\n"

0 commit comments

Comments
 (0)