Hello members, I have a little issue with style and I can not resolve this. I want to put some buttons on a toolbar but can not find the way to tell the third element that is first-child pseudo-class.This is the code in Python: from gi.repository import Gtk as gtk window = gtk.Window() window.connect("delete-event", gtk.main_quit) toolbar = gtk.Toolbar() toolbar.set_show_arrow(False) toolbar.set_style(gtk.ToolbarStyle.ICONS) toolbar.set_icon_size(gtk.IconSize.MENU) window.add(toolbar) context = toolbar.get_style_context() context.add_class(gtk.STYLE_CLASS_INLINE_TOOLBAR) item = gtk.ToolItem() label = gtk.Label() label.set_markup("<b>The title</b>") item.add(label) toolbar.add(item) separator = gtk.SeparatorToolItem() separator.set_draw(False) toolbar.add(separator) button = gtk.ToolButton() button.set_icon_name("list-add-symbolic") toolbar.add(button) # tests #context = button.get_style_context() # test-1 #context.add_region(gtk.STYLE_CLASS_BUTTON, gtk.RegionFlags.FIRST) # test-2 #context.set_junction_sides(gtk.JunctionSides.RIGHT) # test-3 #path = button.get_path() #path.iter_add_region(-1, gtk.STYLE_CLASS_BUTTON, gtk.RegionFlags.FIRST) button = gtk.ToolButton() button.set_icon_name("list-remove-symbolic") toolbar.add(button) window.show_all() gtk.main() But I get the result of the image that I attached. The commented code are some tests. The question is: How to force the third element to be first-child pseudo-class? I attach the desired result (edited image). Thanks in advance. Juan Manuel
Attachment:
toolbar-result.png
Description: PNG image
Attachment:
desired-result.png
Description: PNG image