[gtk+] window: Subtract shadow from passed in width for height
- From: Benjamin Otte <otte src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+] window: Subtract shadow from passed in width for height
 
- Date: Tue, 29 Apr 2014 17:36:42 +0000 (UTC)
 
commit 8b15cd33eec98d382c79cf91daafc24204c4ca5a
Author: Benjamin Otte <otte redhat com>
Date:   Tue Apr 29 19:26:06 2014 +0200
    window: Subtract shadow from passed in width for height
    
    ... and height for width in size requests. Fixes mislayout in
    control-center universal access panel.
 gtk/gtkwindow.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index bd060c3..72c1d35 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -8405,6 +8405,8 @@ gtk_window_get_preferred_width_for_height (GtkWidget *widget,
     {
       get_shadow_width (widget, &window_border);
 
+      height -= window_border.top + window_border.bottom;
+
       if (priv->title_box != NULL &&
           gtk_widget_get_visible (priv->title_box) &&
           gtk_widget_get_child_visible (priv->title_box))
@@ -8515,6 +8517,8 @@ gtk_window_get_preferred_height_for_width (GtkWidget *widget,
     {
       get_shadow_width (widget, &window_border);
 
+      width -= window_border.left + window_border.right;
+
       if (priv->title_box != NULL &&
           gtk_widget_get_visible (priv->title_box) &&
           gtk_widget_get_child_visible (priv->title_box))
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]