From d4caf3d6793529d6b7a4693749cd043dac4e16ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 20 Jan 2020 09:26:08 +0100 Subject: [PATCH] cssimagescaled: Implement is_computed() --- gtk/gtkcssimagescaled.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk/gtkcssimagescaled.c b/gtk/gtkcssimagescaled.c index 5fce72949b..6dd3b05b4e 100644 --- a/gtk/gtkcssimagescaled.c +++ b/gtk/gtkcssimagescaled.c @@ -203,6 +203,15 @@ gtk_css_image_scaled_parse (GtkCssImage *image, return TRUE; } +static gboolean +gtk_css_image_scaled_is_computed (GtkCssImage *image) +{ + GtkCssImageScaled *self = GTK_CSS_IMAGE_SCALED (image); + + return self->n_images == 1 && + gtk_css_image_is_computed (self->images[0]); +} + static void _gtk_css_image_scaled_class_init (GtkCssImageScaledClass *klass) { @@ -216,6 +225,7 @@ _gtk_css_image_scaled_class_init (GtkCssImageScaledClass *klass) image_class->parse = gtk_css_image_scaled_parse; image_class->compute = gtk_css_image_scaled_compute; image_class->print = gtk_css_image_scaled_print; + image_class->is_computed = gtk_css_image_scaled_is_computed; object_class->dispose = gtk_css_image_scaled_dispose; }