Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently noticed that monodevelop, can change GTK theme in runtime . How do I add it in my quickly app?

share|improve this question
Please dont! A single theme for all apps is an important part of good usability. Individual apps should not change the theme themselfs. – xubuntix Oct 4 '12 at 7:29
@xubuntix: Thanks but I know that , but I wanna let the user to chose favourate theme (Iff they wish) for my app(as in mono develop) – Tachyons Oct 5 '12 at 15:05

If you want, you can check out my Blog Post on Python, GTK and CSS

I tried to do a little write-up on how to do it (I used it for my quickly app as well).

share|improve this answer
Upvote because content in link is great! – mjohnsonengr Dec 7 '14 at 21:13

You can use Gtk.CssProvidor to load a css file. For example:

css_provider = Gtk.CssProvider()
screen = Gdk.Screen.get_default()
style_context = window.get_style_context()
style_context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)

Where "file_name.css" is the css file you want to load (the themes in ubuntu seem to be in /usr/share/themes/THEME_NAME/gtk-3.0/) and window is the window widget you are using. If you want to load css from a string you can use css_provider.load_from_data(string_name.encode('UTF-8')) instead of css_provider.load_from_file("file_name.css")


share|improve this answer
Registered just to upvote you sir! – Chris Timberlake Jan 21 '15 at 9:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.