[gnome-shell/gbsneto/custom-icon-positions: 21/40] appDisplay: Compare indicator and grid pages
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 21/40] appDisplay: Compare indicator and grid pages
- Date: Wed, 27 May 2020 22:42:52 +0000 (UTC)
commit d49f15a85340e53bedbae1d847dc6433924db0c5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon May 25 16:52:43 2020 -0300
appDisplay: Compare indicator and grid pages
In the past, the icon grid would update the number of pages
during the call to adaptToSize(). However, after the new grid
layout landed, the number of pages is updated by the time an
item is added or removed.
Instead of comparing the old and new number of pages in the
icon grid, compare the pages shown by the indicator, and the
grid pages.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
js/ui/appDisplay.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 754ff03291..20cbd480b7 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -446,13 +446,13 @@ var BaseAppView = GObject.registerClass({
const availWidth = box.get_width();
const availHeight = box.get_height();
- const oldNPages = this._grid.nPages;
+ const indicatorNPages = this._pageIndicators.nPages;
this._grid.adaptToSize(availWidth, availHeight);
if (this._availWidth !== availWidth ||
this._availHeight !== availHeight ||
- oldNPages !== this._grid.nPages) {
+ indicatorNPages !== this._grid.nPages) {
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this._adjustment.value = 0;
this._grid.currentPage = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]