diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-27 18:26:05 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-07-03 14:39:25 +0200 |
commit | af2c40bd54149237cd4ab998b5515167018fdc47 (patch) | |
tree | 09b605f0a8192ea4215863cdca2082eaf263d3a8 /gtk/gtkcsscolorvalue.c | |
parent | 38e1748df89ef0a92b050f77529cd42cea9b3caa (diff) | |
download | gtk+-af2c40bd54149237cd4ab998b5515167018fdc47.tar.gz |
css: Add a scale argument to css-value compute vfunc
We need to be able to compute different GtkCssImage values
depending on the scale, and we need this at compute time so that
we don't need to read any images other than the scale in used (to
e.g. calculate the image size). GtkStyleProviderPrivate is shared
for all style contexts, so its not right.
Diffstat (limited to 'gtk/gtkcsscolorvalue.c')
-rw-r--r-- | gtk/gtkcsscolorvalue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkcsscolorvalue.c b/gtk/gtkcsscolorvalue.c index d523fe82d4..9972d96a99 100644 --- a/gtk/gtkcsscolorvalue.c +++ b/gtk/gtkcsscolorvalue.c @@ -101,6 +101,7 @@ gtk_css_value_color_free (GtkCssValue *color) static GtkCssValue * gtk_css_value_color_get_fallback (guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values) { @@ -124,6 +125,7 @@ gtk_css_value_color_get_fallback (guint property_id, return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)), property_id, provider, + scale, values, parent_values, NULL); @@ -297,6 +299,7 @@ static GtkCssValue * gtk_css_value_color_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -335,7 +338,7 @@ gtk_css_value_color_compute (GtkCssValue *value, NULL); if (resolved == NULL) - return gtk_css_value_color_get_fallback (property_id, provider, values, parent_values); + return gtk_css_value_color_get_fallback (property_id, provider, scale, values, parent_values); return resolved; } |