Save and restore GtkStyleContext in a few places that were not doing it
Does not fix any known problem, but seems prudent
This commit is contained in:
@@ -250,12 +250,14 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
||||
stateFlag = GTK_STATE_FLAG_ACTIVE;
|
||||
}
|
||||
GtkStyleContext* sc = gtk_widget_get_style_context(widget);
|
||||
gtk_style_context_save(sc);
|
||||
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);
|
||||
gtk_style_context_restore(sc);
|
||||
attr.colFg = wxColour(*fc);
|
||||
attr.colBg = wxColour(*bc);
|
||||
attr.font = wxFont(info);
|
||||
|
Reference in New Issue
Block a user