[gtk+] cssimagecrossfade: Fix order of images when parsing/printing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssimagecrossfade: Fix order of images when parsing/printing
- Date: Mon, 15 Feb 2016 03:45:39 +0000 (UTC)
commit de38435921ebec9a1a31640140a3eea86c907d4e
Author: Benjamin Otte <otte gnome org>
Date: Mon Feb 15 01:46:29 2016 +0100
cssimagecrossfade: Fix order of images when parsing/printing
The syntax is cross-fade(<percentage> <end>, <start>), not the
other way around. That's because the percentage refers to the end image.
gtk/gtkcssimagecrossfade.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkcssimagecrossfade.c b/gtk/gtkcssimagecrossfade.c
index 6677e40..8124579 100644
--- a/gtk/gtkcssimagecrossfade.c
+++ b/gtk/gtkcssimagecrossfade.c
@@ -182,15 +182,15 @@ gtk_css_image_cross_fade_parse (GtkCssImage *image,
else
cross_fade->progress = 0.5;
- cross_fade->start = _gtk_css_image_new_parse (parser);
- if (cross_fade->start == NULL)
+ cross_fade->end = _gtk_css_image_new_parse (parser);
+ if (cross_fade->end == NULL)
return FALSE;
if (_gtk_css_parser_try (parser, ",", TRUE))
{
/* XXX: allow parsing colors here */
- cross_fade->end = _gtk_css_image_new_parse (parser);
- if (cross_fade->end == NULL)
+ cross_fade->start = _gtk_css_image_new_parse (parser);
+ if (cross_fade->start == NULL)
return FALSE;
}
@@ -215,14 +215,14 @@ gtk_css_image_cross_fade_print (GtkCssImage *image,
g_string_append_printf (string, "%g%% ", cross_fade->progress * 100.0);
}
- if (cross_fade->start)
- _gtk_css_image_print (cross_fade->start, string);
+ if (cross_fade->end)
+ _gtk_css_image_print (cross_fade->end, string);
else
g_string_append (string, "none");
- if (cross_fade->end)
+ if (cross_fade->start)
{
g_string_append (string, ", ");
- _gtk_css_image_print (cross_fade->end, string);
+ _gtk_css_image_print (cross_fade->start, string);
}
g_string_append (string, ")");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]