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



commit 1564fdd8cc33ab6da58bc81e0f6f9dea1b80f684
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 3ac73bb..a5340c6 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1261,10 +1261,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;
@@ -1296,16 +1295,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]