From 6ab0be8f6dc7e5fe727d57ffc99e2d85170e0cb6 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Tue, 23 Sep 2008 14:39:23 +1200 Subject: [PATCH] Fade out the notification. Now to get notifications to move up the screen when a new one arrives. --- lib/Display/Notifications.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Display/Notifications.pm b/lib/Display/Notifications.pm index c2270fd..c75819b 100644 --- a/lib/Display/Notifications.pm +++ b/lib/Display/Notifications.pm @@ -64,6 +64,18 @@ sub add { sub expire { my ($self) = @_[OBJECT]; + for my $block ($self->{'blocks'}->members()) { + if ($block->{'expire'} <= time()) { + my $old_effect = Clutter::EffectTemplate->new_for_duration(1000, 'main::smoothstep_inc' ); + my $old = Clutter::Effect->fade($old_effect, $block->{'block'}, 0, $self->can('post_fade_out'), $self); + $old->start(); + } + } +} + +sub post_fade_out { + my ($old_timeline, $self) = @_; + for my $block ($self->{'blocks'}->members()) { if ($block->{'expire'} <= time()) { $self->{'stage'}->remove($block->{'block'}); -- 2.30.2