From 135e3875e26b73523999d1666c8cdee411292b08 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 21 Nov 2017 22:05:08 -0800 Subject: [PATCH] Hide wxSpinButton's underlying GtkEntry using CSS on GTK+ >= 3.20 --- src/gtk/spinbutt.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index 0f7c1253db..28ae45dbbd 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -106,6 +106,14 @@ bool wxSpinButton::Create(wxWindow *parent, #if GTK_CHECK_VERSION(3,12,0) if (gtk_check_version(3,12,0) == NULL) gtk_entry_set_max_width_chars(GTK_ENTRY(m_widget), 0); +#endif +#ifdef __WXGTK3__ + if (gtk_check_version(3,20,0) == NULL) + { + GTKApplyCssStyle( + "entry { min-width:0; padding-left:0; padding-right:0 }" + "button.down { border-style:none }"); + } #endif gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (int)(m_windowStyle & wxSP_WRAP) );