[libadwaita/wip/exalm/squeezer: 2/2] squeezer: Fix measuring wfh and hfw children




commit 4bbf4591e1949f3f532cf75fb54383bb0ecd5e71
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Aug 8 12:59:32 2022 +0400

    squeezer: Fix measuring wfh and hfw children

 src/adw-squeezer.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/adw-squeezer.c b/src/adw-squeezer.c
index 85d76b9f..43663fac 100644
--- a/src/adw-squeezer.c
+++ b/src/adw-squeezer.c
@@ -947,8 +947,12 @@ adw_squeezer_measure (GtkWidget      *widget,
      * appearant size and position of a child to changes suddenly when a larger
      * child gets enabled/disabled.
      */
-    gtk_widget_measure (child, orientation, for_size,
-                        &child_min, &child_nat, NULL, NULL);
+    if (self->orientation == orientation)
+      gtk_widget_measure (child, orientation, -1,
+                          &child_min, &child_nat, NULL, NULL);
+    else
+      gtk_widget_measure (child, orientation, for_size,
+                          &child_min, &child_nat, NULL, NULL);
 
     if (self->orientation == orientation) {
       if (self->allow_none)


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