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:56 -07:00
parent d8e6043602
commit 536ebb1bc4

View File

@@ -1823,15 +1823,12 @@ 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_color(context, selectedFocused, &fg_orig);
gtk_style_context_get_background_color(context, selectedFocused, &bg_orig);
if (IsMultiLine())
gtk_style_context_restore(context);
if (fg_ok)