GtkButtonBox: remove spacing when buttons are linked

GtkButtonBox adds the "linked" class to its style context when its
layout is set to GTK_BUTTONBOX_EXPAND. It shouldn't ever make sense to
have spacing between buttons in that case, as themes generally draw
linked elements with a continuous border.

Thus, always set spacing to 0 and ignore GtkDialog's button-spacing
style property when the layout is set to EXPAND.

Also remove the now-redundant css rules which set button-spacing to 0
for message dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=752131
This commit is contained in:
Lars Uebernickel
2015-07-08 16:36:07 +02:00
parent 0f479deb5e
commit 2dda89cbd5
5 changed files with 8 additions and 6 deletions

View File

@ -696,8 +696,9 @@ update_spacings (GtkDialog *dialog)
_gtk_box_set_spacing_set (GTK_BOX (priv->vbox), FALSE);
}
gtk_box_set_spacing (GTK_BOX (priv->action_area),
button_spacing);
/* don't set spacing when buttons are linked */
if (gtk_button_box_get_layout (GTK_BUTTON_BOX (priv->action_area)) != GTK_BUTTONBOX_EXPAND)
gtk_box_set_spacing (GTK_BOX (priv->action_area), button_spacing);
if (!_gtk_container_get_border_width_set (GTK_CONTAINER (priv->action_area)))
{