Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01524651 authored by Raph Levien's avatar Raph Levien
Browse files

Fix for bug 8911390 RTL text alignment is changed ...

The predicate for detecting whether text was right aligned was missing
some cases - it was correctly sensing RIGHT or OPPOSITE aligned text
in the LTR case, but was missing NORMAL for rtl. This patch just adds
that case.

Change-Id: I06691e7122e1ca91d66299cf0d7ef1f8a476a44b
parent b3c2b21b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -64,7 +64,9 @@ public class Touch {
        if (actualWidth < availableWidth) {
            if (a == Alignment.ALIGN_CENTER) {
                x = left - ((availableWidth - actualWidth) / 2);
            } else if ((ltr && (a == Alignment.ALIGN_OPPOSITE)) || (a == Alignment.ALIGN_RIGHT)) {
            } else if ((ltr && (a == Alignment.ALIGN_OPPOSITE)) ||
                       (!ltr && (a == Alignment.ALIGN_NORMAL)) ||
                       (a == Alignment.ALIGN_RIGHT)) {
                // align_opposite does NOT mean align_right, we need the paragraph
                // direction to resolve it to left or right
                x = left - (availableWidth - actualWidth);