[polari] userList: Don't animate sidebar and filter entry at the same time



commit fcd1c3caabb591a9ffe7b70a3e44f86d72790439
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Oct 4 22:07:31 2013 +0200

    userList: Don't animate sidebar and filter entry at the same time
    
    It just looks weird - in case the user list was hidden, we should
    show or hide the filter entry without animation before revealing
    the sidebar.

 src/mainWindow.js |    4 ++++
 src/userList.js   |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index dd4f91a..dbec756 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -92,6 +92,10 @@ const MainWindow = new Lang.Class({
             function(group, actionName, value) {
                 revealer.reveal_child = value.get_boolean();
             }));
+        revealer.connect('notify::child-revealed', Lang.bind(this,
+            function() {
+                this._userListSidebar.animateEntry = revealer.child_revealed;
+            }));
 
         this._selectionModeAction = app.lookup_action('selection-mode');
         this._selectionModeAction.connect('notify::state',
diff --git a/src/userList.js b/src/userList.js
index 51e43bc..398b419 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -26,6 +26,10 @@ const UserListSidebar = new Lang.Class({
                                   Lang.bind(this, this._activeRoomChanged));
     },
 
+    set animateEntry(animate) {
+        this._revealer.transition_duration = animate ? 250 : 0;
+    },
+
     _createWidget: function() {
         this.widget = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
 


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