Fix single line wxTextCtrl selection colors when foreground or background color is set with GTK3
see #17527
This commit is contained in:
@@ -1830,16 +1830,13 @@ void wxTextCtrl::DoApplyWidgetStyle(GtkRcStyle *style)
|
|||||||
{
|
{
|
||||||
GdkRGBA *fg_orig, *bg_orig;
|
GdkRGBA *fg_orig, *bg_orig;
|
||||||
GtkStyleContext* context = gtk_widget_get_style_context(m_text);
|
GtkStyleContext* context = gtk_widget_get_style_context(m_text);
|
||||||
if (IsMultiLine())
|
|
||||||
{
|
|
||||||
gtk_style_context_save(context);
|
gtk_style_context_save(context);
|
||||||
|
if (IsMultiLine())
|
||||||
gtk_style_context_add_class(context, GTK_STYLE_CLASS_VIEW);
|
gtk_style_context_add_class(context, GTK_STYLE_CLASS_VIEW);
|
||||||
}
|
|
||||||
gtk_style_context_set_state(context, selectedFocused);
|
gtk_style_context_set_state(context, selectedFocused);
|
||||||
gtk_style_context_get(context, selectedFocused,
|
gtk_style_context_get(context, selectedFocused,
|
||||||
"color", &fg_orig, "background-color", &bg_orig,
|
"color", &fg_orig, "background-color", &bg_orig,
|
||||||
NULL);
|
NULL);
|
||||||
if (IsMultiLine())
|
|
||||||
gtk_style_context_restore(context);
|
gtk_style_context_restore(context);
|
||||||
|
|
||||||
if (fg_ok)
|
if (fg_ok)
|
||||||
|
Reference in New Issue
Block a user