Commit 405f2f30 authored by Carlos Garnacho's avatar Carlos Garnacho

GtkStyleContext: restore widget state too in restore().

parent 8b267a58
......@@ -222,6 +222,7 @@ struct GtkStyleInfo
GArray *style_classes;
GArray *regions;
GtkJunctionSides junction_sides;
GtkStateFlags state_flags;
};
struct StyleData
......@@ -256,8 +257,6 @@ struct GtkStyleContextPrivate
GSList *info_stack;
StyleData *current_data;
GtkStateFlags state_flags;
GSList *animation_regions;
GSList *animations;
......@@ -1275,11 +1274,13 @@ gtk_style_context_set_state (GtkStyleContext *context,
GtkStateFlags flags)
{
GtkStyleContextPrivate *priv;
GtkStyleInfo *info;
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
priv = context->priv;
priv->state_flags = flags;
info = priv->info_stack->data;
info->state_flags = flags;
}
/**
......@@ -1296,11 +1297,14 @@ GtkStateFlags
gtk_style_context_get_state (GtkStyleContext *context)
{
GtkStyleContextPrivate *priv;
GtkStyleInfo *info;
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), 0);
priv = context->priv;
return priv->state_flags;
info = priv->info_stack->data;
return info->state_flags;
}
static gboolean
......
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