Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <gonzalo@laptop.org>2011-12-07 18:52:25 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-12-08 14:22:23 (GMT)
commita9f65da08c84ae99f25919c7ae43d02af71d64b5 (patch)
treec2866aacf29e45a7880fc249aa8196dc9756f8ba
parent5dedbe0c764888f773bc6447e9fc10bff906fc0a (diff)
Set the sugar theme name in gsettings according the scale
We need set the theme in gsettings according the scale in the SUGAR_SCLING environment variable. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--src/sugar3/activity/activity.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py
index c402e04..67dd758 100644
--- a/src/sugar3/activity/activity.py
+++ b/src/sugar3/activity/activity.py
@@ -268,10 +268,15 @@ class Activity(Window, Gtk.Container):
icons_path = os.path.join(get_bundle_path(), 'icons')
Gtk.IconTheme.get_default().append_search_path(icons_path)
+ sugar_theme = 'sugar-72'
+ if 'SUGAR_SCALING' in os.environ:
+ if os.environ['SUGAR_SCALING'] == '100':
+ sugar_theme = 'sugar-100'
+
# This code can be removed when we grow an xsettings daemon (the GTK+
# init routines will then automatically figure out the font settings)
settings = Gtk.Settings.get_default()
- settings.set_property('gtk-theme-name', 'sugar')
+ settings.set_property('gtk-theme-name', sugar_theme)
settings.set_property('gtk-icon-theme-name', 'sugar')
settings.set_property('gtk-font-name',
'%s %f' % (style.FONT_FACE, style.FONT_SIZE))