[gnome-shell] overviewControls: Really fix x align



commit aa3caff7143916e9e63cd9dae13e54be7b861c83
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Oct 10 10:58:42 2014 +0200

    overviewControls: Really fix x align
    
    Commit a4475465f1f2 fixed the wrong alignment for the fully visible
    control, but regressed the partially slid-out one; take the slideX
    factor into account to get the right offset for both cases.

 js/ui/overviewControls.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 5dd2be4..b5f60de 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -64,7 +64,8 @@ const SlideLayout = new Lang.Class({
         // flags only determine what to do if the allocated box is bigger
         // than the actor's box.
         let realDirection = getRtlSlideDirection(this._direction, child);
-        let alignX = (realDirection == SlideDirection.RIGHT) ? (availWidth - natWidth) : 0;
+        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth)
+                                                            : (availWidth - natWidth * this._slideX);
 
         let actorBox = new Clutter.ActorBox();
         actorBox.x1 = box.x1 + alignX + this._translationX;


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