diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 997316d524..03effd8c1f 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1830,17 +1830,14 @@ void wxTextCtrl::DoApplyWidgetStyle(GtkRcStyle *style) { GdkRGBA *fg_orig, *bg_orig; GtkStyleContext* context = gtk_widget_get_style_context(m_text); + gtk_style_context_save(context); if (IsMultiLine()) - { - gtk_style_context_save(context); 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); + gtk_style_context_restore(context); if (fg_ok) gtk_widget_override_color(m_text, selectedFocused, fg_orig);