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.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '13 at 16:42

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.