From af2c40bd54149237cd4ab998b5515167018fdc47 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 27 Jun 2013 18:26:05 +0200 Subject: 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. --- gtk/gtkcsscornervalue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gtk/gtkcsscornervalue.c') diff --git a/gtk/gtkcsscornervalue.c b/gtk/gtkcsscornervalue.c index 394675c71a..625e8022bd 100644 --- a/gtk/gtkcsscornervalue.c +++ b/gtk/gtkcsscornervalue.c @@ -40,6 +40,7 @@ static GtkCssValue * gtk_css_value_corner_compute (GtkCssValue *corner, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -47,8 +48,8 @@ gtk_css_value_corner_compute (GtkCssValue *corner, GtkCssValue *x, *y; GtkCssDependencies x_deps, y_deps; - x = _gtk_css_value_compute (corner->x, property_id, provider, values, parent_values, &x_deps); - y = _gtk_css_value_compute (corner->y, property_id, provider, values, parent_values, &y_deps); + x = _gtk_css_value_compute (corner->x, property_id, provider, scale, values, parent_values, &x_deps); + y = _gtk_css_value_compute (corner->y, property_id, provider, scale, values, parent_values, &y_deps); *dependencies = _gtk_css_dependencies_union (x_deps, y_deps); if (x == corner->x && y == corner->y) { -- cgit v1.2.1