[gnome-shell/wip/swarm: 28/36] 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: 28/36] IconGrid: Give preference for icons size updates over before_redraw
- Date: Mon, 30 Jun 2014 12:31:35 +0000 (UTC)
commit 8f5e247df9eebb75401c7749b7046dbd955b3a29
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 8fe21af..6e79429 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]