[libhandy] carousel-box: Don't check the min size of expanded children



commit 6c9379e877dc5634cab6416ffdf00091dfcb15a4
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Jul 27 14:23:48 2021 +0200

    carousel-box: Don't check the min size of expanded children
    
    We want to unconditionally give them the full size and it is guaranteed
    to be at least the child's minimum size.

 src/hdy-carousel-box.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-carousel-box.c b/src/hdy-carousel-box.c
index 1e545fe5..f6b6279c 100644
--- a/src/hdy-carousel-box.c
+++ b/src/hdy-carousel-box.c
@@ -840,14 +840,14 @@ hdy_carousel_box_size_allocate (GtkWidget     *widget,
       gtk_widget_get_preferred_width_for_height (child, allocation->height,
                                                  &min, &nat);
       if (gtk_widget_get_hexpand (child))
-        child_size = MAX (min, allocation->width);
+        child_size = allocation->width;
       else
         child_size = CLAMP (nat, min, allocation->width);
     } else {
       gtk_widget_get_preferred_height_for_width (child, allocation->width,
                                                  &min, &nat);
       if (gtk_widget_get_vexpand (child))
-        child_size = MAX (min, allocation->height);
+        child_size = allocation->height;
       else
         child_size = CLAMP (nat, min, allocation->height);
     }


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