[gnome-shell/gbsneto/40-stuff: 19/68] viewSelector: Tie workspace snap axis to adjustment
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/40-stuff: 19/68] viewSelector: Tie workspace snap axis to adjustment
- Date: Wed, 20 Jan 2021 22:41:07 +0000 (UTC)
commit c8d924a0e0b25b1cef2667f75dfa1df903ef82a5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Dec 29 18:51:40 2020 -0300
viewSelector: Tie workspace snap axis to adjustment
Tie the snap axis adjustment of WorkspacesDisplay to the
state adjustment of AppPagesContainer, and transition to
the horizontal snap axis when the app grid is visible.
js/ui/viewSelector.js | 3 +++
js/ui/workspacesView.js | 4 ++++
2 files changed, 7 insertions(+)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 0f33c4c521..cb293a326b 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -169,6 +169,9 @@ class AppsPageContainer extends St.Widget {
this._appDisplay.opacity = progress * 255;
this._appDisplay.visible = progress !== 0;
+
+ const { snapAdjustment } = this._workspacesDisplay;
+ snapAdjustment.value = 1 - progress;
}
_getWorkspacesBoxes(box) {
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 131d8553fd..47a32c636e 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -934,4 +934,8 @@ class WorkspacesDisplay extends St.Widget {
Main.wm.actionMoveWorkspace(ws);
return Clutter.EVENT_STOP;
}
+
+ get snapAdjustment() {
+ return this._snapAdjustment;
+ }
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]