diff options
author | Benjamin Otte <otte@redhat.com> | 2015-01-31 11:01:25 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-02-06 11:26:31 +0100 |
commit | 9209c4ea411efc08a59eba12ff7898bd7be1aa05 (patch) | |
tree | f51bfa690eb5f6176fdd086f94272c23357f008a /gtk/gtkstylecascade.c | |
parent | 0b06b1e3f7565620372382760897b5a9895fc339 (diff) | |
download | gtk+-9209c4ea411efc08a59eba12ff7898bd7be1aa05.tar.gz |
stylecontext: Store the scale value in the cascade
This is in preparation for the next commits.
Diffstat (limited to 'gtk/gtkstylecascade.c')
-rw-r--r-- | gtk/gtkstylecascade.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gtk/gtkstylecascade.c b/gtk/gtkstylecascade.c index dd34aa18f8..9219d61b59 100644 --- a/gtk/gtkstylecascade.c +++ b/gtk/gtkstylecascade.c @@ -276,6 +276,8 @@ style_provider_data_clear (gpointer data_) static void _gtk_style_cascade_init (GtkStyleCascade *cascade) { + cascade->scale = 1; + cascade->providers = g_array_new (FALSE, FALSE, sizeof (GtkStyleProviderData)); g_array_set_clear_func (cascade->providers, style_provider_data_clear); } @@ -373,3 +375,24 @@ _gtk_style_cascade_remove_provider (GtkStyleCascade *cascade, } } +void +_gtk_style_cascade_set_scale (GtkStyleCascade *cascade, + int scale) +{ + g_return_if_fail (GTK_IS_STYLE_CASCADE (cascade)); + + if (cascade->scale == scale) + return; + + cascade->scale = scale; + + _gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (cascade)); +} + +int +_gtk_style_cascade_get_scale (GtkStyleCascade *cascade) +{ + g_return_val_if_fail (GTK_IS_STYLE_CASCADE (cascade), 1); + + return cascade->scale; +} |