[gtk/wip/baedert/single-node-window: 32/47] window: Don't care about shadow in measure()



commit 0ca11929695d4e7a26c9b0309d95a3472611c81d
Author: Timm Bäder <mail baedert org>
Date:   Sat May 2 08:45:19 2020 +0200

    window: Don't care about shadow in measure()

 gtk/gtkwindow.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e773ab41be..b5b8f90efc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -630,18 +630,9 @@ gtk_window_measure (GtkWidget      *widget,
   int title_nat_size = 0;
   int child_min_size = 0;
   int child_nat_size = 0;
-  GtkBorder window_border = { 0 };
-
 
   if (priv->decorated && !priv->fullscreen)
     {
-      get_shadow_width (window, &window_border);
-
-      if (orientation == GTK_ORIENTATION_HORIZONTAL)
-        for_size -= window_border.left + window_border.right;
-      else
-        for_size -= 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))
@@ -680,17 +671,13 @@ gtk_window_measure (GtkWidget      *widget,
 
   if (orientation == GTK_ORIENTATION_HORIZONTAL)
     {
-      title_min_size += window_border.left + window_border.right;
-      title_nat_size += window_border.left + window_border.right;
-      child_min_size += window_border.left + window_border.right;
-      child_nat_size += window_border.left + window_border.right;
       *minimum = MAX (title_min_size, child_min_size);
       *natural = MAX (title_nat_size, child_nat_size);
     }
   else
     {
-      *minimum = title_min_size + child_min_size + window_border.top + window_border.bottom;
-      *natural = title_nat_size + child_nat_size + window_border.top + window_border.bottom;
+      *minimum = title_min_size + child_min_size;
+      *natural = title_nat_size + child_nat_size;
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]