summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-03-17 18:35:21 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-03-17 19:01:25 -0400
commit75a1e8251e2c4718cb62e9e553a1c3e711399b95 (patch)
tree2a1e36f5f3aa61da6812baed83c397c3e9f1e05b
parent68b9bafd1d71c900090410bf90e4c76db9382ad2 (diff)
downloadgtk+-75a1e8251e2c4718cb62e9e553a1c3e711399b95.tar.gz
Allocate the titlebar height according to width
-rw-r--r--gtk/gtkwindow.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index dbf7d79718..59598b5a62 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6046,16 +6046,18 @@ _gtk_window_set_allocation (GtkWindow *window,
{
GtkAllocation title_allocation;
- gtk_widget_get_preferred_height (priv->title_box,
- NULL,
- &title_height);
-
title_allocation.x = title_border.left + window_border.left;
title_allocation.y = title_border.top + window_border.top;
title_allocation.width =
MAX (1, (gint) allocation->width -
title_border.left - title_border.right -
window_border.left - window_border.right);
+
+ gtk_widget_get_preferred_height_for_width (priv->title_box,
+ title_allocation.width,
+ NULL,
+ &title_height);
+
title_allocation.height = title_height;
gtk_widget_size_allocate (priv->title_box, &title_allocation);