[nautilus/wip/corey/properties: 44/44] properties: Set extension properties page as hidden by default




commit e6038a83d4a18a565e09cdaedd6cb5d543a4ef4f
Author: Corey Berla <corey berla me>
Date:   Wed Aug 24 13:13:19 2022 -0700

    properties: Set extension properties page as hidden by default
    
    Generally, we want the properties page to be the height of the content
    in the main page or subpages (i.e. permissions).  The extensions page,
    however, can be variable in length, and in some cases very long.
    This can lead to the properties page being the full screen height
    in many cases.  Set the extensions page as not visible until it's
    navigated to.

 src/nautilus-properties-window.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index cb14a6ab6..ed5508166 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -549,9 +549,11 @@ navigate_extension_model_page (NautilusPropertiesWindow *self,
                                GParamSpec               *params,
                                AdwPreferencesRow        *row)
 {
-    gtk_stack_set_visible_child (self->page_stack,
-                                 g_object_get_data (G_OBJECT (row),
-                                                    "nautilus-extension-properties-page"));
+    GtkWidget *extension_properties_page = g_object_get_data (G_OBJECT (row),
+                                                              "nautilus-extension-properties-page");
+
+    gtk_widget_set_visible (extension_properties_page, TRUE);
+    gtk_stack_set_visible_child (self->page_stack, extension_properties_page);
 }
 
 static void
@@ -1018,6 +1020,7 @@ add_extension_model_page (NautilusPropertiesModel  *model,
     gtk_box_append (GTK_BOX (box), header_bar);
     gtk_box_append (GTK_BOX (box), page);
     gtk_widget_add_css_class (page, "background");
+    gtk_widget_set_visible (GTK_WIDGET (box), FALSE);
 
     gtk_stack_add_named (self->page_stack,
                          box,


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