css: Move scale to GtkStyleProviderPrivate

This way, we can remove it as a separate argument from
gtk_css_value_compute() and allow computation to only depend on one
thing: the style provider.
This commit is contained in:
Benjamin Otte
2015-01-31 11:56:15 +01:00
parent 808bfe0a98
commit 1116914ea0
44 changed files with 177 additions and 215 deletions

View File

@ -128,9 +128,8 @@ static GtkCssImage *
gtk_css_image_icon_theme_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
int scale,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
{
GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
@ -147,8 +146,8 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
copy->name = g_strdup (icon_theme->name);
copy->icon_theme = gtk_icon_theme_get_for_screen (screen);
copy->scale = scale;
copy->color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (values, GTK_CSS_PROPERTY_COLOR));
copy->scale = _gtk_style_provider_private_get_scale (provider);
copy->color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR));
*dependencies = GTK_CSS_DEPENDS_ON_COLOR;