[gtk+] GtkHeaderBar: Fix allocation of start and end boxes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkHeaderBar: Fix allocation of start and end boxes
- Date: Tue, 17 Dec 2013 01:37:34 +0000 (UTC)
commit 1ccbca42d0792bb5273ad894bc8742af37b04945
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 16 20:36:22 2013 -0500
GtkHeaderBar: Fix allocation of start and end boxes
We were giving these boxes too much width, consuming what
was supposed to be the spacing between the boxes and the
other content of the header bar.
gtk/gtkheaderbar.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index e0a35b6..3b49cb0 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -1107,8 +1107,8 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
if (left)
child_allocation.x = allocation->x + css_borders.left;
else
- child_allocation.x = allocation->x + allocation->width - css_borders.right - start_width;
- child_allocation.width = start_width;
+ child_allocation.x = allocation->x + allocation->width - css_borders.right - start_width +
priv->spacing;
+ child_allocation.width = start_width - priv->spacing;
gtk_widget_size_allocate (priv->titlebar_start_box, &child_allocation);
}
@@ -1118,8 +1118,8 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
if (left)
child_allocation.x = allocation->x + css_borders.left;
else
- child_allocation.x = allocation->x + allocation->width - css_borders.right - end_width;
- child_allocation.width = end_width;
+ child_allocation.x = allocation->x + allocation->width - css_borders.right - end_width +
priv->spacing;
+ child_allocation.width = end_width - priv->spacing;
gtk_widget_size_allocate (priv->titlebar_end_box, &child_allocation);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]