[gnome-shell/wip/swarm: 9/10] Search: animate icons on new window



commit 25ebcdbecb3657e1a6ae7f72d76fee21e165b735
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Thu Jun 26 21:32:04 2014 +0200

    Search: animate icons on new window
    
    Following design decision, animate icons on search page on new window.

 js/ui/appDisplay.js |    2 +-
 js/ui/search.js     |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index ab5169c..e9a67f4 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1074,7 +1074,7 @@ const AppSearchProvider = new Lang.Class({
 
     createResultObject: function (resultMeta) {
         let app = this._appSys.lookup_app(resultMeta['id']);
-        return new AppIcon(app);
+        return new AppIcon(app, { animateOnNewWindow: true });
     }
 });
 
diff --git a/js/ui/search.js b/js/ui/search.js
index 753287b..3f908fc 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -6,6 +6,7 @@ const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
 const Meta = imports.gi.Meta;
 const Signals = imports.signals;
+const Shell = imports.gi.Shell;
 const St = imports.gi.St;
 const Atk = imports.gi.Atk;
 
@@ -349,6 +350,7 @@ const ListSearchResults = new Lang.Class({
         this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
         this.providerIcon.connect('clicked', Lang.bind(this,
             function() {
+                this.providerIcon.animateOut();
                 provider.launchSearch(this._terms);
                 Main.overview.toggle();
             }));
@@ -657,5 +659,12 @@ const ProviderIcon = new Lang.Class({
                                  gicon: provider.appInfo.get_icon() });
         this._content.add_actor(icon);
         this._content.add_actor(this.moreIcon);
+    },
+
+    animateOut: function() {
+        let appSys = Shell.AppSystem.get_default();
+        let app = appSys.lookup_app(this.provider.appInfo.get_id());
+        //if (app.state == Shell.AppState.STOPPED)
+        IconGrid.actorZoomOut(this._content);
     }
 });


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