[gimp/gimp-2-10] Issue #2260 - "Selection to Path Advanced Settings" dialog not scrollable



commit 30d5fb48519a0d3ab9e19e96d555c3d61fb50ae6
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jan 5 14:16:55 2019 +0100

    Issue #2260 - "Selection to Path Advanced Settings" dialog not scrollable
    
    Put the entire dialog content into a scrolled window.
    
    (cherry picked from commit 99764000be445e76a1e4ba41434d392ab9446ae2)

 .../selection-to-path/selection-to-path-dialog.c     | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/selection-to-path/selection-to-path-dialog.c 
b/plug-ins/selection-to-path/selection-to-path-dialog.c
index 456eb41f90..a51c20687b 100644
--- a/plug-ins/selection-to-path/selection-to-path-dialog.c
+++ b/plug-ins/selection-to-path/selection-to-path-dialog.c
@@ -84,14 +84,32 @@ def_val (gdouble default_value)
 GtkWidget *
 dialog_create_selection_area (SELVALS *sels)
 {
+  GtkWidget *scrolled_win;
+  GtkWidget *viewport;
   GtkWidget *table;
   GtkWidget *check;
   GtkObject *adj;
   gint       row;
 
+  scrolled_win = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_set_size_request (scrolled_win, -1, 400);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
+                                       GTK_SHADOW_NONE);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
+                                  GTK_POLICY_NEVER,
+                                  GTK_POLICY_ALWAYS);
+
+  viewport = gtk_viewport_new (NULL, NULL);
+  gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
+  gtk_container_add (GTK_CONTAINER (scrolled_win), viewport);
+  gtk_widget_show (viewport);
+
   table = gtk_table_new (20, 3, FALSE);
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
   gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+  gtk_container_add (GTK_CONTAINER (viewport), table);
+  gtk_widget_show (table);
+
   row = 0;
 
   adj = gimp_scale_entry_new (GTK_TABLE (table), 0, row++,
@@ -381,5 +399,5 @@ dialog_create_selection_area (SELVALS *sels)
   adjust_widgets = g_slist_append (adjust_widgets, adj);
   g_object_set_data (G_OBJECT (adj), "default_value", def_val (3.0));
 
-  return table;
+  return scrolled_win;
 }


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