Blob Blame History Raw
From 0903f8c1052039fc4dffeb813678ec1a8cb72682 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Thu, 27 Feb 2020 21:15:28 +0100
Subject: [PATCH 03/37] docking: Ensure that all the slider children are
 properly centered

Not to make the whole dash container to stick to the topmost/leftmost side,
we need to adjust the vertical and horizontal alignment of the dash slide
container so that it's centered for the relevant axis.

This was previously applied to the whole Docked dash, but this was already
well positioned, while we need to ensure that its content is also properly
aligned.
---
 docking.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/docking.js b/docking.js
index a222ae9..e0e8c37 100644
--- a/docking.js
+++ b/docking.js
@@ -231,15 +231,18 @@ var DockedDash = GObject.registerClass({
             name: 'dashtodockContainer',
             reactive: false,
             style_class: positionStyleClass[this._position],
-            x_align: this._isHorizontal ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.START,
-            y_align: this._isHorizontal ? Clutter.ActorAlign.START : Clutter.ActorAlign.CENTER,
         });
         this._delegate = this;
 
         // This is the sliding actor whose allocation is to be tracked for input regions
         this._slider = new DashSlideContainer({
             side: this._position,
-            slidex: 0
+            slidex: 0,
+            ...(this._isHorizontal ? {
+                x_align: Clutter.ActorAlign.CENTER,
+            } : {
+                y_align: Clutter.ActorAlign.CENTER,
+            })
         });
 
         // This is the actor whose hover status us tracked for autohide
-- 
2.26.0