diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-14 15:44:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-17 15:02:47 +0100 |
commit | dd04278bfc3c89336283fcab1222147dcd796a77 (patch) | |
tree | de395ef2dc1a3f357abe67582313d4f97adc749c /vcl | |
parent | 70f7697c4243739c28feaa33b091f6c64a8356cb (diff) |
need 3.19.2 or above for these
Change-Id: If385b45b12c72a0d7460a9a4c9d0b0e3bfc1195e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index a485343bec1a..04561e72ebe1 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -714,9 +714,12 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, gtk_style_context_get_padding( mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), &padding); gint nArrowWidth = FALLBACK_ARROW_SIZE; - gtk_style_context_get(mpComboboxButtonArrowStyle, - gtk_style_context_get_state(mpComboboxButtonArrowStyle), - "min-width", &nArrowWidth, nullptr); + if (gtk_check_version(3, 19, 2) == nullptr) + { + gtk_style_context_get(mpComboboxButtonArrowStyle, + gtk_style_context_get_state(mpComboboxButtonArrowStyle), + "min-width", &nArrowWidth, nullptr); + } gint nButtonWidth = nArrowWidth + padding.left + padding.right; if( nPart == ControlPart::ButtonDown ) @@ -772,17 +775,20 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, aEditBoxRect.SetPos( Point( areaRect.Left() + buttonRect.GetWidth(), areaRect.Top() ) ); gint arrow_width = FALLBACK_ARROW_SIZE, arrow_height = FALLBACK_ARROW_SIZE; - if (nType == ControlType::Combobox) - { - gtk_style_context_get(mpComboboxButtonArrowStyle, - gtk_style_context_get_state(mpComboboxButtonArrowStyle), - "min-width", &arrow_width, "min-height", &arrow_height, nullptr); - } - else if (nType == ControlType::Listbox) + if (gtk_check_version(3, 19, 2) == nullptr) { - gtk_style_context_get(mpListboxButtonArrowStyle, - gtk_style_context_get_state(mpListboxButtonArrowStyle), - "min-width", &arrow_width, "min-height", &arrow_height, nullptr); + if (nType == ControlType::Combobox) + { + gtk_style_context_get(mpComboboxButtonArrowStyle, + gtk_style_context_get_state(mpComboboxButtonArrowStyle), + "min-width", &arrow_width, "min-height", &arrow_height, nullptr); + } + else if (nType == ControlType::Listbox) + { + gtk_style_context_get(mpListboxButtonArrowStyle, + gtk_style_context_get_state(mpListboxButtonArrowStyle), + "min-width", &arrow_width, "min-height", &arrow_height, nullptr); + } } arrowRect.SetSize(Size(arrow_width, arrow_height)); |