Fix single line wxTextCtrl selection colors when foreground or background color is set with GTK3

see #17527
This commit is contained in:
Paul Cornett
2016-05-14 11:38:36 -07:00
parent 5d671d8136
commit 4c6dddec21

View File

@@ -1830,16 +1830,13 @@ void wxTextCtrl::DoApplyWidgetStyle(GtkRcStyle *style)
{
GdkRGBA *fg_orig, *bg_orig;
GtkStyleContext* context = gtk_widget_get_style_context(m_text);
if (IsMultiLine())
{
gtk_style_context_save(context);
if (IsMultiLine())
gtk_style_context_add_class(context, GTK_STYLE_CLASS_VIEW);
}
gtk_style_context_set_state(context, selectedFocused);
gtk_style_context_get(context, selectedFocused,
"color", &fg_orig, "background-color", &bg_orig,
NULL);
if (IsMultiLine())
gtk_style_context_restore(context);
if (fg_ok)