mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-07 01:00:28 +00:00
GtkStyleContext: restore widget state too in restore().
This commit is contained in:
parent
8b267a58da
commit
405f2f306a
@ -222,6 +222,7 @@ struct GtkStyleInfo
|
|||||||
GArray *style_classes;
|
GArray *style_classes;
|
||||||
GArray *regions;
|
GArray *regions;
|
||||||
GtkJunctionSides junction_sides;
|
GtkJunctionSides junction_sides;
|
||||||
|
GtkStateFlags state_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StyleData
|
struct StyleData
|
||||||
@ -256,8 +257,6 @@ struct GtkStyleContextPrivate
|
|||||||
GSList *info_stack;
|
GSList *info_stack;
|
||||||
StyleData *current_data;
|
StyleData *current_data;
|
||||||
|
|
||||||
GtkStateFlags state_flags;
|
|
||||||
|
|
||||||
GSList *animation_regions;
|
GSList *animation_regions;
|
||||||
GSList *animations;
|
GSList *animations;
|
||||||
|
|
||||||
@ -1275,11 +1274,13 @@ gtk_style_context_set_state (GtkStyleContext *context,
|
|||||||
GtkStateFlags flags)
|
GtkStateFlags flags)
|
||||||
{
|
{
|
||||||
GtkStyleContextPrivate *priv;
|
GtkStyleContextPrivate *priv;
|
||||||
|
GtkStyleInfo *info;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||||
|
|
||||||
priv = context->priv;
|
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)
|
gtk_style_context_get_state (GtkStyleContext *context)
|
||||||
{
|
{
|
||||||
GtkStyleContextPrivate *priv;
|
GtkStyleContextPrivate *priv;
|
||||||
|
GtkStyleInfo *info;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), 0);
|
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), 0);
|
||||||
|
|
||||||
priv = context->priv;
|
priv = context->priv;
|
||||||
return priv->state_flags;
|
info = priv->info_stack->data;
|
||||||
|
|
||||||
|
return info->state_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user