[gnome-shell] appDisplay: Center-align arrows



commit 88c3945ae1f4988be8dabfd3b3c4f5d99075a82b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Aug 9 14:26:24 2022 -0300

    appDisplay: Center-align arrows
    
    As per feedback, center align the navigation arrows since they
    are big enough of click targets.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2335>

 js/ui/appDisplay.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 1b21f14dc8..b4c00f824e 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -426,9 +426,11 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
         rightBox.x1 = rightBox.x2 - indicatorsWidth;
 
         this._previousPageIndicator.allocate(ltr ? leftBox : rightBox);
-        this._previousPageArrow.allocate(ltr ? leftBox : rightBox);
+        this._previousPageArrow.allocate_align_fill(ltr ? leftBox : rightBox,
+            0.5, 0.5, false, false);
         this._nextPageIndicator.allocate(ltr ? rightBox : leftBox);
-        this._nextPageArrow.allocate(ltr ? rightBox : leftBox);
+        this._nextPageArrow.allocate_align_fill(ltr ? rightBox : leftBox,
+            0.5, 0.5, false, false);
 
         this._pageWidth = box.get_width();
     }
@@ -565,7 +567,8 @@ var BaseAppView = GObject.registerClass({
             icon_name: rtl
                 ? 'carousel-arrow-previous-symbolic'
                 : 'carousel-arrow-next-symbolic',
-            x_expand: true,
+            x_align: Clutter.ActorAlign.CENTER,
+            y_align: Clutter.ActorAlign.CENTER,
         });
         this._nextPageArrow.connect('clicked',
             () => this.goToPage(this._grid.currentPage + 1));
@@ -577,7 +580,8 @@ var BaseAppView = GObject.registerClass({
                 : 'carousel-arrow-previous-symbolic',
             opacity: 0,
             visible: false,
-            x_expand: true,
+            x_align: Clutter.ActorAlign.CENTER,
+            y_align: Clutter.ActorAlign.CENTER,
         });
         this._prevPageArrow.connect('clicked',
             () => this.goToPage(this._grid.currentPage - 1));


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