Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I get dark toolbars in gtkmm like in gedit or system settings? I can only seem to find how to do it in pyGTK.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I presume that you just need to map the Python GTK functions to GTKMM. The code in Python GTK is:

context = self.toolbar.get_style_context()
context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)

So you just need to find the equivilent of get_style_context() and add_class() and the Gtk.STYLE_CLASS_PRIMARY_TOOLBAR constant.

share|improve this answer
    
I don't know why i didn't find this before: link –  Sam Bickley Jun 20 '12 at 22:37
    
This is the desired gtkmm equivelent: Glib::RefPtr<Gtk::StyleContext> sc = toolbar.get_style_context(); sc->add_class("primary-toolbar"); –  Rafał Cieślak Dec 19 '12 at 19:42
add comment

Your Answer

 
discard

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.