[gnome-shell] [dash] Right align well icons for RTL locales



commit 87e5457095ff80330d4a880e80ea7ec1ea29bc1d
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Jun 6 01:59:48 2010 +0200

    [dash] Right align well icons for RTL locales
    
    When changing the alignment of well icons from centered to left,
    we should swap it for RTL locales.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=619236

 js/ui/appDisplay.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 7d246ab..7ebd194 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -971,7 +971,12 @@ WellGrid.prototype = {
             let childYSpacing = Math.max(0, height - childNaturalHeight) / 2;
 
             let childBox = new Clutter.ActorBox();
-            childBox.x1 = Math.floor(x + childXSpacing);
+            if (St.Widget.get_default_direction() == St.TextDirection.RTL) {
+                let _x = box.x2 - (x + width);
+                childBox.x1 = Math.floor(_x - childXSpacing);
+            } else {
+                childBox.x1 = Math.floor(x + childXSpacing);
+            }
             childBox.y1 = Math.floor(y + childYSpacing);
             childBox.x2 = childBox.x1 + width;
             childBox.y2 = childBox.y1 + height;



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