[polari/user-list-update: 6/6] userList: Don't animate sidebar and filter entry at the same time
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/user-list-update: 6/6] userList: Don't animate sidebar and filter entry at the same time
- Date: Fri, 4 Oct 2013 21:17:52 +0000 (UTC)
commit e2f14de51d03345f309754532764cea3a6c6b469
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 e65ef16..2710766 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -85,6 +85,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 cb12600..cf84225 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]