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




commit 23cda3a7dcd2bd951d91fef8c16b0e3ef37dc274
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]