[gnome-shell/wip/swarm: 4/9] IconGrid: Give preference for icons size updates over before_redraw



commit 37b47eb84373214c58aa61b057ba7577d51ef563
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Thu Jun 19 20:30:40 2014 +0200

    IconGrid: Give preference for icons size updates over before_redraw

 js/ui/iconGrid.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 158b90f..0e068ac 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -731,7 +731,10 @@ const IconGrid = new Lang.Class({
             this._updateSpacingForSize(availWidth, availHeight);
         }
         let scale = Math.min(this._fixedHItemSize, this._fixedVItemSize) / Math.max(this._hItemSize, 
this._vItemSize);
-        Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { 
this._updateChildrenScale(scale); }));
+
+        if (this._updateIconSizeId)
+            Meta.later_remove(this._updateIconSizeId);
+        this._updateIconSizeId = Meta.later_add(Meta.LaterType.RESIZE, Lang.bind(this, function() { 
this._updateChildrenScale(scale); }));
     },
 
     // Note that this is ICON_SIZE as used by BaseIcon, not elsewhere in IconGrid; it's a bit messed up


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