summaryrefslogtreecommitdiff
path: root/gtk/gtkbbox.c
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2015-07-08 16:36:07 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2015-07-14 15:12:56 +0200
commit2dda89cbd52e09cfbc24a9139caa7a65a5f73f2c (patch)
tree962c99450398cae89637c4d0103a55b27341364b /gtk/gtkbbox.c
parent0f479deb5eb90fe131a91b7e6d0a8df7f93fec2a (diff)
downloadgtk+-2dda89cbd52e09cfbc24a9139caa7a65a5f73f2c.tar.gz
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
Diffstat (limited to 'gtk/gtkbbox.c')
-rw-r--r--gtk/gtkbbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 260e1c74e5..68ec4845c8 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -359,6 +359,7 @@ gtk_button_box_set_layout (GtkButtonBox *widget,
if (priv->layout_style == GTK_BUTTONBOX_EXPAND)
{
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (widget)), "linked");
+ gtk_box_set_spacing (GTK_BOX (widget), 0);
gtk_box_set_homogeneous (GTK_BOX (widget), TRUE);
}
else