Hide wxSpinButton's underlying GtkEntry using CSS on GTK+ >= 3.20

This commit is contained in:
Paul Cornett
2017-11-21 22:05:08 -08:00
parent f7d9098f1f
commit 135e3875e2

View File

@@ -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) );