[gnome-shell] Revert "dash: Add minor optimization to _adjustIconSize()"
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "dash: Add minor optimization to _adjustIconSize()"
- Date: Mon, 17 Oct 2011 14:01:57 +0000 (UTC)
commit 1721db6d8d799dc04c2edc26509ba0439416c733
Author: Florian MÃllner <fmuellner gnome org>
Date: Mon Oct 17 16:00:08 2011 +0200
Revert "dash: Add minor optimization to _adjustIconSize()"
Ooops, a patch got lost in rebase ...
This reverts commit 6d95e8b98874bed67bd895a505fd198a350a69cb.
js/ui/dash.js | 24 +++++++-----------------
1 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 36588c0..aa5f972 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -427,20 +427,14 @@ Dash.prototype = {
let firstIcon = iconChildren[0]._delegate.child._delegate.icon;
- let minHeight, natHeight;
+ // Icons may be animating, so enforce the current icon size
+ // during the size request
+ let [currentWidth, currentHeight] = firstIcon.icon.get_size();
- // Enforce the current icon size during the size request if
- // the icon is animating
- if (firstIcon._animating) {
- let [currentWidth, currentHeight] = firstIcon.icon.get_size();
+ firstIcon.icon.set_size(this.iconSize, this.iconSize);
+ let [minHeight, natHeight] = iconChildren[0].get_preferred_height(-1);
- firstIcon.icon.set_size(this.iconSize, this.iconSize);
- [minHeight, natHeight] = iconChildren[0].get_preferred_height(-1);
-
- firstIcon.icon.set_size(currentWidth, currentHeight);
- } else {
- [minHeight, natHeight] = iconChildren[0].get_preferred_height(-1);
- }
+ firstIcon.icon.set_size(currentWidth, currentHeight);
// Subtract icon padding and box spacing from the available height
@@ -484,15 +478,11 @@ Dash.prototype = {
icon.icon.set_size(icon.icon.width * scale,
icon.icon.height * scale);
- icon._animating = true;
Tweener.addTween(icon.icon,
{ width: targetWidth,
height: targetHeight,
time: DASH_ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete: function() {
- icon._animating = false;
- }
+ transition: 'easeOutQuad'
});
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]