[gimp] libgimp: Add scrollbar to dialog comments
- From: Alx Sa <sawyeralex src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: Add scrollbar to dialog comments
- Date: Fri, 30 Sep 2022 18:54:08 +0000 (UTC)
commit 091ce7cdf2149133cf1c722d29f950c377cd262f
Author: Gotam Gorabh <gautamy672 gmail com>
Date: Fri Sep 30 18:54:07 2022 +0000
libgimp: Add scrollbar to dialog comments
Resolves #8550
Puts comments widget in GtkScrolledWindow widget to prevent
dialogue growing too tall with multi-line comments.
libgimp/gimpsaveproceduredialog.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/libgimp/gimpsaveproceduredialog.c b/libgimp/gimpsaveproceduredialog.c
index ea4a72825a..4515e7762f 100644
--- a/libgimp/gimpsaveproceduredialog.c
+++ b/libgimp/gimpsaveproceduredialog.c
@@ -279,6 +279,7 @@ gimp_save_procedure_dialog_fill_list (GimpProcedureDialog *dialog,
GtkWidget *frame2;
GtkWidget *title;
GParamSpec *pspec;
+ GtkWidget *scrolled_window;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (config),
"gimp-comment");
@@ -302,9 +303,17 @@ gimp_save_procedure_dialog_fill_list (GimpProcedureDialog *dialog,
if (tooltip)
gimp_help_set_help_data (widget, tooltip, NULL);
+ scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_set_size_request (scrolled_window, -1, 100);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_OUT);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ gtk_container_add (GTK_CONTAINER (frame2), scrolled_window);
+ gtk_widget_show (scrolled_window);
gtk_widget_set_hexpand (widget, TRUE);
gtk_widget_set_vexpand (widget, TRUE);
- gtk_container_add (GTK_CONTAINER (frame2), widget);
+ gtk_container_add (GTK_CONTAINER (scrolled_window), widget);
gtk_widget_show (widget);
gtk_grid_attach (GTK_GRID (grid), frame2, 0, top, 6, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]