1

In my application toolbar, I have two toolbar buttons Travel Planner and Departures as shown below,

enter image description here

I need to change it this,

enter image description here

As you can see in the 2nd image, it seems that 1 button has 3 actions combined in them. It is also similar to the Gnome Control Center style.

How can this be done?

1 Answer 1

1

This can be done directly through Glade.

Build and select your toolbar. In the right select the common tab and add the line inline-toolbar to the Style classes.

enter image description here

Note that you won't see anything different in the editor itself, but only when you run the application or through the builtin previewer.

If you build your interface by hand, you have to set the style class manually like this:

# You take care of getting the toolbar ofcourse
context = toolbar.get_style_context()
context.add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR)

More style classes can be found in the documentation.

1
  • I couldn't do this using glade (12.04 Precise) since it does not have the Style Classes option. I could however set it using my python code. When I apply this though I lose the black background color which signifies the applications' main toolbar. Is there a way to combine both the styles together?
    – nik90
    Feb 9, 2013 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .