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.

Lately, I've seen the widget below appear in GTK applications. I can't find it in Glade. What is it?

enter image description here

share|improve this question
    
It might help if you tell us in which GTK apps you've seen it. Thanks! –  David Planella Feb 29 '12 at 8:28
    
That one is from Totem, but we also see them everywhere in the System Settings, for instance. At least in Precise. Is it possible that it's only a button group with some specific styling? –  Jo-Erlend Schinstad Feb 29 '12 at 8:59
add comment

2 Answers 2

up vote 11 down vote accepted

Looking at the Totem code, it looks like a set of GktButtons inside a GtkToolbar, with a CSS style applied and using symbolic icons (which are also installed by the theme in Ubuntu) instead of the stock ones.

Here's an example in Python

# Assuming builder is an initialized Gtk.Builder object and toolbar exists
# in the .ui definition file and is populated with Gtk.ToolButtons

context = builder.get_object('toolbar').get_style_context()
context.add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR)

More info on GTK+ 3 CSS styles:

share|improve this answer
add comment

It is buttons on ".inline-toolbar"..

share|improve this answer
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.