[gnome-shell/wip/swarm: 5/13] IconGrid: Give preference for icons size updates over before_redraw
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 5/13] IconGrid: Give preference for icons size updates over before_redraw
- Date: Thu, 26 Jun 2014 19:38:33 +0000 (UTC)
commit e2da328756040d900b4cfa2c7e0c02abdf8e106f
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]