[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/unx
Caolán McNamara
caolanm at redhat.com
Fri Jun 19 05:33:19 PDT 2015
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit e8d203ed975a4c9fdfac81778924a11b3ba6c91d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 19 13:30:20 2015 +0100
gtk3: we need to take margins in account for scrollbars
Change-Id: I406977acab12a2f805de1f57b91378e9b80195d4
(cherry picked from commit 3bc5d730dc2c7a093b9c490dc329c3429ce4f183)
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index f9d41ef..126cca5 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -408,9 +408,15 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
gtk_style_context_set_state(context, stateFlags);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_SLIDER);
+ GtkBorder margin;
+ gtk_style_context_get_margin(context, stateFlags, &margin);
+
+
gtk_render_slider(context, cr,
- thumbRect.Left(), thumbRect.Top(),
- thumbRect.GetWidth(), thumbRect.GetHeight(), scrollbarOrientation);
+ thumbRect.Left() + margin.left, thumbRect.Top() + margin.top,
+ thumbRect.GetWidth() - margin.left - margin.right,
+ thumbRect.GetHeight() - margin.top - margin.bottom,
+ scrollbarOrientation);
gtk_style_context_restore(context);
}
More information about the Libreoffice-commits
mailing list