[gnome-shell/gbsneto/40-stuff: 12/68] workspacesView: Center workspaces of primary display




commit f70d9dc223fd5a6f460e1b9262384198ee061ca7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Dec 11 15:57:49 2020 -0300

    workspacesView: Center workspaces of primary display

 js/ui/workspacesView.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index c91a04fe6d..a7b052cf73 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -118,10 +118,10 @@ class WorkspacesView extends WorkspacesViewBase {
             if (rtl && !vertical)
                 index = nWorkspaces - index - 1;
 
-            const x = vertical ? 0 : index * this.width;
-            const y = vertical ? index * this.height : 0;
-
-            child.allocate_available_size(x, y, box.get_width(), box.get_height());
+            box.set_origin(
+                vertical ? 0 : index * this.width,
+                vertical ? index * this.height : 0);
+            child.allocate_align_fill(box, 0.5, 0.5, false, false);
         });
 
         this._updateScrollPosition();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]