[libadwaita] carousel: Don't check the min size of expanded children



commit b60f945b20da7dcc11eec5790fe1d90d7f09b964
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Jul 27 14:40:56 2021 +0200

    carousel: 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/adw-carousel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/adw-carousel.c b/src/adw-carousel.c
index a498b751..3343be02 100644
--- a/src/adw-carousel.c
+++ b/src/adw-carousel.c
@@ -616,14 +616,14 @@ adw_carousel_size_allocate (GtkWidget *widget,
       gtk_widget_measure (child, self->orientation,
                           height, &min, &nat, NULL, NULL);
       if (gtk_widget_get_hexpand (child))
-        child_size = MAX (min, width);
+        child_size = width;
       else
         child_size = CLAMP (nat, min, width);
     } else {
       gtk_widget_measure (child, self->orientation,
                           width, &min, &nat, NULL, NULL);
       if (gtk_widget_get_vexpand (child))
-        child_size = MAX (min, height);
+        child_size = height;
       else
         child_size = CLAMP (nat, min, height);
     }


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