Browse files

GTK 3.21: stop properties window going full height

Stop the properties window from ballooning to full screen height when built and run with GTK 3.21/22. In GTK 3.21 the "emblems" tab's scrolled window will expand to the entire height of the screen attempting to accomodate all icons unless this is explicitly limited using the new command gtk_scrolled_window_set_max_content_height().

Unfortunately that command is GTK 3.21 and later only, so this forces GTK 3.21 builds to be run only with Gtk 3.21 and later.  Thus this is put behind a GTK 3.21 selector and packages built from it must depend on GTK 3.21 and later. Fortunately no distro is going to ship any file manager built with newer GTK 3 than they ship. A GTK 3.21 build of this will actually open in 3.20 but hit the undefined symbol and crash if you select "properties" on any item, exactly as I would expect it to so.
1 parent ee1dfee commit fb2849550b6916b6d0399a163a756ec3b911d704 @lukefromdc lukefromdc committed with raveit65 Jul 14, 2016
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/file-manager/fm-properties-window.c
5 src/file-manager/fm-properties-window.c
@@ -4009,7 +4009,10 @@ create_emblems_page (FMPropertiesWindow *window)
scroller = eel_scrolled_wrap_table_new (TRUE, GTK_SHADOW_NONE, &emblems_table);
gtk_container_set_border_width (GTK_CONTAINER (emblems_table), 12);
+/*stop GTK 3.22 builds from ballooning the properties dialog to full screen height */
+#if GTK_CHECK_VERSION(3,21,0)
+ gtk_scrolled_window_set_max_content_height(scroller, 300);
gtk_widget_show (scroller);
gtk_notebook_append_page (window->details->notebook,

0 comments on commit fb28495

Please sign in to comment.