Commit cf7a3e58 authored by Jim Nelson's avatar Jim Nelson

Second half of revert of toolbar button size: Refs bgo#723578

This code must also remain, as it deals with situations where
spacers are placed before or after the linked buttons.
parent 6d7489e8
......@@ -81,6 +81,22 @@ public class PillToolbar : Gtk.Toolbar {
foreach(Gtk.Button button in buttons)
box.add(button);
int i = 0;
foreach(Gtk.Button button in buttons) {
box.add(button);
// Place the right spacer on the button itself. This way if the button is not displayed,
// the spacer will not appear.
if (i == buttons.size - 1 && after_spacer) {
if (button.get_direction() == Gtk.TextDirection.RTL)
button.set_margin_left(12);
else
button.set_margin_right(12);
}
i++;
}
Gtk.ToolItem tool_item = new Gtk.ToolItem();
tool_item.add(box);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment