[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
This commit is contained in:
Florian Müllner 2010-06-06 01:59:48 +02:00
parent cba49959c1
commit 87e5457095

View File

@ -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;