[gthumb: 2/10] [slideshow] added a fade effect to the slide transition
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 2/10] [slideshow] added a fade effect to the slide transition
- Date: Tue, 6 Apr 2010 23:23:28 +0000 (UTC)
commit 075c4424148e3da918a330fcc01687be602fab7a
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Apr 5 15:48:27 2010 +0200
[slideshow] added a fade effect to the slide transition
extensions/slideshow/main.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/extensions/slideshow/main.c b/extensions/slideshow/main.c
index 15a9328..71e9903 100644
--- a/extensions/slideshow/main.c
+++ b/extensions/slideshow/main.c
@@ -93,6 +93,10 @@ slide_from_right_transition (GthSlideshow *self,
clutter_actor_get_size (self->stage, &stage_w, &stage_h);
clutter_actor_set_x (self->next_image, (float) VALUE_AT_MSECS (stage_w, GTH_TRANSITION_DURATION - msecs) + self->next_geometry.x);
+ if (self->current_image != NULL)
+ clutter_actor_set_opacity (self->current_image, (int) VALUE_AT_MSECS (255.0, GTH_TRANSITION_DURATION - msecs));
+ clutter_actor_set_opacity (self->next_image, (int) VALUE_AT_MSECS (255.0, msecs));
+
if (self->first_frame) {
if (self->current_image != NULL) {
clutter_actor_show (self->current_image);
@@ -112,6 +116,10 @@ slide_from_bottom_transition (GthSlideshow *self,
clutter_actor_get_size (self->stage, &stage_w, &stage_h);
clutter_actor_set_y (self->next_image, (float) VALUE_AT_MSECS (stage_h, GTH_TRANSITION_DURATION - msecs) + self->next_geometry.y);
+ if (self->current_image != NULL)
+ clutter_actor_set_opacity (self->current_image, (int) VALUE_AT_MSECS (255.0, GTH_TRANSITION_DURATION - msecs));
+ clutter_actor_set_opacity (self->next_image, (int) VALUE_AT_MSECS (255.0, msecs));
+
if (self->first_frame) {
if (self->current_image != NULL) {
clutter_actor_show (self->current_image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]