PDA

View Full Version : Custom Theme for a gtk app?



earobinson
October 5th, 2008, 04:18 PM
I'm playing with pygtk and I want to write an app that has a black background, buttons, etc and white text. Is there any way to do this at all? (can I set the color for each button manually or can I set the theme for the whole app?)

Cheers.

days_of_ruin
October 5th, 2008, 08:08 PM
To set the gtk theme for the entire application:

settings = gtk.settings_get_default()
settings.set_property("gtk-theme-name",gtk_theme_name)

earobinson
October 5th, 2008, 08:26 PM
Cheers, Ill test this as soon as I have the chance.

earobinson
October 7th, 2008, 04:40 PM
Hum It did not seem to work, any idea why

gtk_settings = gtk.settings_get_default()
gtk_settings.set_property('gtk-theme-name', 'UbuntuStudio')
would not work?