Kaydet (Commit) 4cb72083 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#101699 gtk3: get correct arrow width

Change-Id: If02c598306ec6f19cf83958c4a176cafa67076dc
üst 6e8dbdbe
...@@ -680,7 +680,6 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context, ...@@ -680,7 +680,6 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context,
cairo_translate(cr, rControlRectangle.Left(), rControlRectangle.Top()); cairo_translate(cr, rControlRectangle.Left(), rControlRectangle.Top());
} }
#define ARROW_SIZE 11 * 0.85
Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
ControlPart nPart, ControlPart nPart,
Rectangle aAreaRect ) Rectangle aAreaRect )
...@@ -692,7 +691,11 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, ...@@ -692,7 +691,11 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
GtkBorder padding; GtkBorder padding;
gtk_style_context_get_padding( mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), &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; gint nButtonWidth = nArrowWidth + padding.left + padding.right;
if( nPart == ControlPart::ButtonDown ) if( nPart == ControlPart::ButtonDown )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment