forked from AuroraMiddleware/gtk
toolbar: Stop setting state flags on the style context for drawing
This commit is contained in:
parent
a1f72eb06c
commit
4011326388
@ -858,16 +858,11 @@ gtk_toolbar_draw (GtkWidget *widget,
|
|||||||
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
||||||
GtkToolbarPrivate *priv = toolbar->priv;
|
GtkToolbarPrivate *priv = toolbar->priv;
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
|
||||||
GList *list;
|
GList *list;
|
||||||
guint border_width;
|
guint border_width;
|
||||||
|
|
||||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||||
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_background (context, cr, border_width, border_width,
|
gtk_render_background (context, cr, border_width, border_width,
|
||||||
gtk_widget_get_allocated_width (widget) - 2 * border_width,
|
gtk_widget_get_allocated_width (widget) - 2 * border_width,
|
||||||
@ -887,8 +882,6 @@ gtk_toolbar_draw (GtkWidget *widget,
|
|||||||
priv->arrow_button,
|
priv->arrow_button,
|
||||||
cr);
|
cr);
|
||||||
|
|
||||||
gtk_style_context_restore (context);
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user