From 4cb720836ab03701ce508e302790c115c7808619 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 14 Oct 2016 10:34:27 +0100 Subject: Related: tdf#101699 gtk3: get correct arrow width Change-Id: If02c598306ec6f19cf83958c4a176cafa67076dc --- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index fa6a06408ea0..3f215791518c 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -680,7 +680,6 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context, cairo_translate(cr, rControlRectangle.Left(), rControlRectangle.Top()); } -#define ARROW_SIZE 11 * 0.85 Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, Rectangle aAreaRect ) @@ -692,7 +691,11 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, GtkBorder padding; gtk_style_context_get_padding( mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), &padding); - gint nArrowWidth = ARROW_SIZE; + gint nArrowWidth; + gtk_style_context_get(mpComboboxButtonArrowStyle, + gtk_style_context_get_state(mpComboboxButtonArrowStyle), + "min-width", &nArrowWidth, NULL); + gint nButtonWidth = nArrowWidth + padding.left + padding.right; if( nPart == ControlPart::ButtonDown ) { -- cgit