[libadwaita/libadwaita-1-1] squeezer: Fix measuring wfh and hfw children



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

    squeezer: Fix measuring wfh and hfw children
    
    
    (cherry picked from commit 23cda3a7dcd2bd951d91fef8c16b0e3ef37dc274)

 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 11f9a644..0fa235e1 100644
--- a/src/adw-squeezer.c
+++ b/src/adw-squeezer.c
@@ -951,8 +951,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]