[gnome-boxes] Use fade_actor in selectionbar



commit 628273a61cf14a9f15777342988ae7cc1e9be027
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Jun 7 20:18:16 2012 +0200

    Use fade_actor in selectionbar
    
    This makes the code cleaner, and fixes an issue where sometimes
    the selection bar would be hidden on animation completion.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677274

 src/selectionbar.vala |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index 4a18c78..d8d1283 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -62,24 +62,7 @@ private class Boxes.Selectionbar: GLib.Object {
 
     private bool visible {
         set {
-            if (value)
-                show ();
-            else
-                hide ();
+			fade_actor (actor, value ? 255 : 0);
         }
     }
-    private void show () {
-        actor.show ();
-        actor.queue_redraw ();
-        actor.animate (Clutter.AnimationMode.LINEAR, App.app.duration,
-                       "opacity", 255);
-    }
-
-    private void hide () {
-        var anim = actor.animate (Clutter.AnimationMode.LINEAR, App.app.duration,
-                                  "opacity", 0);
-        anim.completed.connect (() => {
-            actor.hide ();
-        });
-    }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]