[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:
parent
cba49959c1
commit
87e5457095
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user