forked from AuroraMiddleware/gtk
hsv: Stop setting state flags on the style context for drawing
This commit is contained in:
parent
1facea2a8d
commit
e9a8938b21
10
gtk/gtkhsv.c
10
gtk/gtkhsv.c
@ -1007,7 +1007,6 @@ paint_triangle (GtkHSV *hsv,
|
|||||||
gint stride;
|
gint stride;
|
||||||
int width, height;
|
int width, height;
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
|
||||||
|
|
||||||
priv = hsv->priv;
|
priv = hsv->priv;
|
||||||
width = gtk_widget_get_allocated_width (widget);
|
width = gtk_widget_get_allocated_width (widget);
|
||||||
@ -1153,8 +1152,6 @@ paint_triangle (GtkHSV *hsv,
|
|||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
|
|
||||||
gtk_style_context_save (context);
|
gtk_style_context_save (context);
|
||||||
state = gtk_widget_get_state_flags (widget);
|
|
||||||
gtk_style_context_set_state (context, state);
|
|
||||||
|
|
||||||
if (INTENSITY (r, g, b) > 0.5)
|
if (INTENSITY (r, g, b) > 0.5)
|
||||||
{
|
{
|
||||||
@ -1214,19 +1211,12 @@ gtk_hsv_draw (GtkWidget *widget,
|
|||||||
if (draw_focus && priv->focus_on_ring)
|
if (draw_focus && priv->focus_on_ring)
|
||||||
{
|
{
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
state = gtk_widget_get_state_flags (widget);
|
|
||||||
|
|
||||||
gtk_style_context_save (context);
|
|
||||||
gtk_style_context_set_state (context, state);
|
|
||||||
|
|
||||||
gtk_render_focus (context, cr, 0, 0,
|
gtk_render_focus (context, cr, 0, 0,
|
||||||
gtk_widget_get_allocated_width (widget),
|
gtk_widget_get_allocated_width (widget),
|
||||||
gtk_widget_get_allocated_height (widget));
|
gtk_widget_get_allocated_height (widget));
|
||||||
|
|
||||||
gtk_style_context_restore (context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user