[gtk+/wip/baedert/drawing: 144/306] popover: Stop looking at padidng and border in measure



commit 443b3d99c11d1edf3928d7ce61bed97920a8c7a6
Author: Timm Bäder <mail baedert org>
Date:   Sat May 6 16:31:46 2017 +0200

    popover: Stop looking at padidng and border in measure
    
    GtkWidget does it for us now

 gtk/gtkpopover.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 45707f1..2f866c9 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1255,10 +1255,9 @@ gtk_popover_measure (GtkWidget      *widget,
 {
   GtkPopover *popover = GTK_POPOVER (widget);
   GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
-  GtkBorder border, margin;
+  GtkBorder margin;
   int minimal_size, extra;
 
-  get_padding_and_border (widget, &border);
   get_margin (widget, &margin);
 
   *minimum = 0;
@@ -1290,16 +1289,15 @@ gtk_popover_measure (GtkWidget      *widget,
   minimal_size = get_minimal_size (popover, orientation);
   if (orientation == GTK_ORIENTATION_HORIZONTAL)
     {
-      *minimum = MAX (*minimum, minimal_size) + border.left + border.right;
-      *natural = MAX (*natural, minimal_size) + border.left + border.right;
+      *minimum = MAX (*minimum, minimal_size);
+      *natural = MAX (*natural, minimal_size);
       extra = MAX (TAIL_HEIGHT, margin.left) + MAX (TAIL_HEIGHT, margin.right);
     }
   else
     {
-      *minimum = MAX (*minimum, minimal_size) + border.top + border.bottom;
-      *natural = MAX (*natural, minimal_size) + border.top + border.bottom;
+      *minimum = MAX (*minimum, minimal_size);
+      *natural = MAX (*natural, minimal_size);
       extra = MAX (TAIL_HEIGHT, margin.bottom) + MAX (TAIL_HEIGHT, margin.top);
-
     }
 
   *minimum += extra;


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