[gtk/wip/baedert/for-master: 738/748] cssimagescaled: Implement is_computed()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 738/748] cssimagescaled: Implement is_computed()
- Date: Fri, 24 Jan 2020 05:21:20 +0000 (UTC)
commit d4caf3d6793529d6b7a4693749cd043dac4e16ed
Author: Timm Bäder <mail baedert org>
Date: Mon Jan 20 09:26:08 2020 +0100
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]