[gnome-shell/wip/carlosg/appgrid-navigation: 14/14] appDisplay: Don't reset adjustment on ::pages-changed
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/appgrid-navigation: 14/14] appDisplay: Don't reset adjustment on ::pages-changed
- Date: Thu, 25 Feb 2021 17:39:36 +0000 (UTC)
commit 37bf8274b2e1f90717b884d7f5d127d07399076b
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 23 23:39:29 2021 +0100
appDisplay: Don't reset adjustment on ::pages-changed
Let the goToPage call afterwards to take precedence, instead
of resetting the adjustment (thus the view) on the side.
This resulted in strange state when the last page contains
a single icon, and it is dragged. The last page being emptied
triggers a pages-changed signal, which half resets the view
to the first page while DnD is ongoing.
Letting goToPage do its business means we neatly clamp to the
closest page to currentPage, the last page in that case.
js/ui/appDisplay.js | 1 -
1 file changed, 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 9226b62736..7a4c2db29e 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -142,7 +142,6 @@ var BaseAppView = GObject.registerClass({
// Standard hack for ClutterBinLayout
this._grid.x_expand = true;
this._grid.connect('pages-changed', () => {
- this._adjustment.value = 0;
this.goToPage(this._grid.currentPage);
this._pageIndicators.setNPages(this._grid.nPages);
this._pageIndicators.setCurrentPosition(this._grid.currentPage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]