Avoid "Gtk-WARNING **: State doesn't match"

See https://github.com/wxWidgets/wxWidgets/pull/232
This commit is contained in:
Paul Cornett
2016-02-24 20:57:48 -08:00
parent d3a0798bc5
commit 69a13d973c
6 changed files with 9 additions and 1 deletions

View File

@@ -252,6 +252,7 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
GtkStyleContext* sc = gtk_widget_get_style_context(widget);
GdkRGBA *fc, *bc;
wxNativeFontInfo info;
gtk_style_context_set_state(sc, stateFlag);
gtk_style_context_get(sc, stateFlag,
"color", &fc, "background-color", &bc,
GTK_STYLE_PROPERTY_FONT, &info.description, NULL);