summaryrefslogtreecommitdiff
path: root/gtk/gtkcssbgsizevalue.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-06-27 18:26:05 +0200
committerAlexander Larsson <alexl@redhat.com>2013-07-03 14:39:25 +0200
commitaf2c40bd54149237cd4ab998b5515167018fdc47 (patch)
tree09b605f0a8192ea4215863cdca2082eaf263d3a8 /gtk/gtkcssbgsizevalue.c
parent38e1748df89ef0a92b050f77529cd42cea9b3caa (diff)
downloadgtk+-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/gtkcssbgsizevalue.c')
-rw-r--r--gtk/gtkcssbgsizevalue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkcssbgsizevalue.c b/gtk/gtkcssbgsizevalue.c
index 662ceb7d1e..df29d9733c 100644
--- a/gtk/gtkcssbgsizevalue.c
+++ b/gtk/gtkcssbgsizevalue.c
@@ -44,6 +44,7 @@ static GtkCssValue *
gtk_css_value_bg_size_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
+ int scale,
GtkCssComputedValues *values,
GtkCssComputedValues *parent_values,
GtkCssDependencies *dependencies)
@@ -58,10 +59,10 @@ gtk_css_value_bg_size_compute (GtkCssValue *value,
x = y = NULL;
if (value->x)
- x = _gtk_css_value_compute (value->x, property_id, provider, values, parent_values, &x_deps);
+ x = _gtk_css_value_compute (value->x, property_id, provider, scale, values, parent_values, &x_deps);
if (value->y)
- y = _gtk_css_value_compute (value->y, property_id, provider, values, parent_values, &y_deps);
+ y = _gtk_css_value_compute (value->y, property_id, provider, scale, values, parent_values, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);