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:
@@ -373,8 +373,10 @@ draw_border(GtkWidget* widget, GdkEventExpose* gdk_event, wxWindow* win)
|
||||
#ifdef __WXGTK3__
|
||||
GtkStyleContext* sc = gtk_widget_get_style_context(win->m_wxwindow);
|
||||
GdkRGBA* c;
|
||||
gtk_style_context_save(sc);
|
||||
gtk_style_context_set_state(sc, GTK_STATE_FLAG_NORMAL);
|
||||
gtk_style_context_get(sc, GTK_STATE_FLAG_NORMAL, "border-color", &c, NULL);
|
||||
gtk_style_context_restore(sc);
|
||||
gdk_cairo_set_source_rgba(cr, c);
|
||||
gdk_rgba_free(c);
|
||||
cairo_set_line_width(cr, 1);
|
||||
@@ -4573,9 +4575,11 @@ void wxWindowGTK::GTKApplyStyle(GtkWidget* widget, GtkRcStyle* WXUNUSED_IN_GTK3(
|
||||
cairo_pattern_t* pattern = NULL;
|
||||
if (m_backgroundColour.IsOk())
|
||||
{
|
||||
gtk_style_context_save(context);
|
||||
gtk_style_context_set_state(context, GTK_STATE_FLAG_NORMAL);
|
||||
gtk_style_context_get(context,
|
||||
GTK_STATE_FLAG_NORMAL, "background-image", &pattern, NULL);
|
||||
gtk_style_context_restore(context);
|
||||
}
|
||||
if (pattern)
|
||||
{
|
||||
|
Reference in New Issue
Block a user