[gnome-shell] dash: Avoid "zoom" effect when first shown
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: Avoid "zoom" effect when first shown
- Date: Wed, 9 Feb 2011 21:36:28 +0000 (UTC)
commit 9bbf293898aa1f84b176267667518d57ae976a28
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Feb 2 16:44:07 2011 +0100
dash: Avoid "zoom" effect when first shown
The dash is created empty and the initial set of items is added
before it's shown for the first time. As the additions of items
is now animated, this results in a slightly odd effect when all
items zoom in at once. So special-case the first time _redisplay()
is called and skip animations in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=636156
js/ui/dash.js | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 975d794..6417ebb 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -250,6 +250,7 @@ Dash.prototype = {
_init : function() {
this._maxHeight = -1;
this._iconSize = 48;
+ this._shownInitially = false;
this._dragPlaceholder = null;
this._dragPlaceholderPos = -1;
@@ -564,6 +565,13 @@ Dash.prototype = {
if (this._favRemoveTarget && this._favRemoveTarget.hiding)
this._favRemoveTarget.actor.show();
+ // Skip animations on first run when adding the initial set
+ // of items, to avoid all items zooming in at once
+ if (!this._shownInitially) {
+ this._shownInitially = true;
+ return;
+ }
+
for (let i = 0; i < removedActors.length; i++) {
removedActors[i].show();
let item = removedActors[i]._delegate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]