summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-14 10:34:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-14 10:34:59 +0100
commit4cb720836ab03701ce508e302790c115c7808619 (patch)
tree6e9b5d0e70426cd81587ef47e6562984e7be92c2 /vcl
parent6e8dbdbe1a9d15d7e7d000e4132fd5df3fecd660 (diff)
Related: tdf#101699 gtk3: get correct arrow width
Change-Id: If02c598306ec6f19cf83958c4a176cafa67076dc
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx7
1 files 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 )
{