activity.py: Apply sugar GTK3 theme and icon theme

In GTK2, theme name and icon theme name properties could be set in the
GTK2 RC file, at runtime, or by the X settings daemon.

For GTK3, the RC file configuration route for these settings has been
removed. As we do not currently have a settings daemon implementation,
apply these important settings at runtime, early in the Activity
class.

Signed-off-by: Daniel Drake <dsd@laptop.org>
master
Daniel Drake 13 years ago committed by Simon Schampijer
parent b51d5c9dc7
commit 3962517a58

@ -274,6 +274,8 @@ class Activity(Window, Gtk.Container):
# 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-icon-theme-name', 'sugar')
settings.set_property('gtk-font-name',
'%s %f' % (style.FONT_FACE, style.FONT_SIZE))

Loading…
Cancel
Save