[gimp/gimp-2-10] app: in GimpOperationTool, add scrollbar width to scrolled-window requisition
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: in GimpOperationTool, add scrollbar width to scrolled-window requisition
- Date: Wed, 13 Feb 2019 18:28:59 +0000 (UTC)
commit 04052fe3a47663b4a88aff032465de07efd7f29e
Author: Ell <ell_se yahoo com>
Date: Wed Feb 13 13:24:50 2019 -0500
app: in GimpOperationTool, add scrollbar width to scrolled-window requisition
... so that the scrollbar doesn't cover the child in wide UIs.
app/tools/gimpoperationtool.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimpoperationtool.c b/app/tools/gimpoperationtool.c
index 20e3bb9ea4..7d34da4328 100644
--- a/app/tools/gimpoperationtool.c
+++ b/app/tools/gimpoperationtool.c
@@ -642,9 +642,25 @@ gimp_operation_tool_add_gui (GimpOperationTool *op_tool)
GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER);
if (scrolling)
- gtk_widget_set_size_request (options_sw, minimum.width, workarea.height / 2);
- else
- gtk_widget_set_size_request (options_sw, minimum.width, minimum.height);
+ {
+ GtkWidget *scrollbar;
+
+ minimum.height = workarea.height / 2;
+
+ scrollbar = gtk_scrolled_window_get_vscrollbar (
+ GTK_SCROLLED_WINDOW (options_sw));
+
+ if (scrollbar)
+ {
+ GtkRequisition req;
+
+ gtk_widget_size_request (scrollbar, &req);
+
+ minimum.width += req.width;
+ }
+ }
+
+ gtk_widget_set_size_request (options_sw, minimum.width, minimum.height);
g_object_unref (options_gui);
g_object_unref (options_box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]