Merge pull request #702 from gaphor/feature/left-justify

Left align the toolbox header labels
This commit is contained in:
Arjan Molenaar 2021-03-22 22:12:52 +01:00 committed by GitHub
commit c10656fe8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,11 @@ class Toolbox(UIComponent, ActionProvider):
self.properties.set("toolbox-collapsed", collapsed)
for index, (title, items) in enumerate(toolbox_actions):
tool_item_group = Gtk.ToolItemGroup.new(title)
tool_item_group = Gtk.ToolItemGroup.new("")
label = Gtk.Label.new(title)
label.set_halign(Gtk.Align.START)
label.show()
tool_item_group.set_label_widget(label)
tool_item_group.set_property("collapsed", collapsed.get(index, False))
tool_item_group.connect("notify::collapsed", on_collapsed, index)
for action_name, label, icon_name, shortcut, *rest in items: