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



commit 99764000be445e76a1e4ba41434d392ab9446ae2
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.

 plug-ins/selection-to-path/selection-to-path-dialog.c | 15 ++++++++++++++-
 1 file changed, 14 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 4d508ee38d..1263aba25d 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,27 @@ def_val (gdouble default_value)
 GtkWidget *
 dialog_create_selection_area (SELVALS *sels)
 {
+  GtkWidget     *scrolled_win;
   GtkWidget     *grid;
   GtkWidget     *check;
   GtkAdjustment *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);
+  gtk_scrolled_window_set_overlay_scrolling (GTK_SCROLLED_WINDOW (scrolled_win),
+                                             FALSE);
+
   grid = gtk_grid_new ();
   gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
   gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
+  gtk_container_add (GTK_CONTAINER (scrolled_win), grid);
+  gtk_widget_show (grid);
   row = 0;
 
   adj = gimp_scale_entry_new (GTK_GRID (grid), 0, row++,
@@ -380,5 +393,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 grid;
+  return scrolled_win;
 }


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