[libhandy] view-switcher: Skip invisible buttons when determining orientation



commit d201bbf292358801c5112a41a25ba952e502f359
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Oct 3 14:51:11 2020 +0500

    view-switcher: Skip invisible buttons when determining orientation
    
    We already do it in measure(), but not here.
    
    Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/337

 src/hdy-view-switcher.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/hdy-view-switcher.c b/src/hdy-view-switcher.c
index 26c5bcf1..651c8dde 100644
--- a/src/hdy-view-switcher.c
+++ b/src/hdy-view-switcher.c
@@ -450,6 +450,9 @@ is_narrow (HdyViewSwitcher *self,
   for (GList *l = children; l != NULL; l = g_list_next (l)) {
     gint h_min = 0;
 
+    if (!gtk_widget_get_visible (l->data))
+      continue;
+
     hdy_view_switcher_button_get_size (HDY_VIEW_SWITCHER_BUTTON (l->data), &h_min, NULL, NULL, NULL);
     max_h_min = MAX (max_h_min, h_min);
 


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