[gtk+/wip/csoriano/pathbar-bin-view-window: 2/2] gtkrevealer: take into account min size of child



commit 63ed9c34ac6bf8dad2113c913b3e5ccb44ff77e2
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Jun 15 18:22:32 2016 +0200

    gtkrevealer: take into account min size of child

 gtk/gtkrevealer.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index b23f66a..1540207 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -338,8 +338,10 @@ gtk_revealer_get_child_allocation (GtkRevealer   *revealer,
                                                    &child_allocation->height);
     }
 
-  child_allocation->width = MAX (child_allocation->width, allocation->width - horizontal_padding);
-  child_allocation->height = MAX (child_allocation->height, allocation->height - vertical_padding);
+  child_allocation->width = MIN (allocation->width,
+                                 MAX (child_allocation->width, allocation->width - horizontal_padding));
+  child_allocation->height = MIN (allocation->height,
+                                  MAX (child_allocation->height, allocation->height - vertical_padding));
 }
 
 static void


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