[gnome-shell/gbsneto/icon-grid-dnd: 14/18] iconGrid: Save a few more values
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-dnd: 14/18] iconGrid: Save a few more values
- Date: Tue, 2 Jul 2019 20:49:58 +0000 (UTC)
commit e99d63dd60ea1454d6f52b36bfb23a558aad2a94
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jul 2 17:39:03 2019 -0300
iconGrid: Save a few more values
That will be used to implement the icon grid nudge effect.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603
js/ui/iconGrid.js | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index cd106c4da..42c7e3bf3 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -210,6 +210,9 @@ var IconGrid = GObject.registerClass({
this.rightPadding = 0;
this.leftPadding = 0;
+ this._leftPadding = 0;
+ this._allocatedColumns = 0;
+
this._items = [];
this._clonesAnimating = [];
// Pulled from CSS, but hardcode some defaults here
@@ -326,6 +329,10 @@ var IconGrid = GObject.registerClass({
leftEmptySpace = availWidth - usedWidth;
}
+ // Store some information about the allocated layout
+ this._leftPadding = leftEmptySpace;
+ this._allocatedColumns = nColumns;
+
let animating = this._clonesAnimating.length > 0;
let x = box.x1 + leftEmptySpace + this.leftPadding;
let y = box.y1 + this.topPadding;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]