Commit e1ff1554 authored by Matthias Clasen's avatar Matthias Clasen

GtkColorSwatch: Avoid style context underflow

The last change accidentally removed the later restore, and
left the earlier, so we ended up with a restore-save sequence.
Thankfully, GtkStyleContext warns about this.
parent 9f3dfa20
...@@ -183,8 +183,6 @@ swatch_draw (GtkWidget *widget, ...@@ -183,8 +183,6 @@ swatch_draw (GtkWidget *widget,
g_object_unref (gicon); g_object_unref (gicon);
} }
gtk_style_context_restore (context);
/* now draw the overlay image */ /* now draw the overlay image */
gtk_style_context_get_border (context, state, &border); gtk_style_context_get_border (context, state, &border);
gtk_style_context_get_padding (context, state, &padding); gtk_style_context_get_padding (context, state, &padding);
...@@ -222,6 +220,8 @@ swatch_draw (GtkWidget *widget, ...@@ -222,6 +220,8 @@ swatch_draw (GtkWidget *widget,
gtk_render_focus (context, cr, 0, 0, width, height); gtk_render_focus (context, cr, 0, 0, width, height);
} }
gtk_style_context_restore (context);
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment