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

Commit 6303613b authored by Evan Laird's avatar Evan Laird
Browse files

Fix RTL in StatusIconContainer

Do the same thing that NotificationIconContainer does, instead of the
wrong thing.

Test: set RTL, observe
Change-Id: I034d648795ff565fdb5f804621174e3c1f485bc5
Fixes: 72391234
parent 34b58512
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ public class StatusIconContainer extends AlphaOptimizedLinearLayout {
     * Layout is happening from end -> start
     */
    private void calculateIconTranslations() {
        float translationX = getWidth();
        float width = getWidth();
        float translationX = width;
        float contentStart = getPaddingStart();
        int childCount = getChildCount();
        // Underflow === don't show content until that index
@@ -133,6 +134,15 @@ public class StatusIconContainer extends AlphaOptimizedLinearLayout {
                }
            }
        }

        // Stole this from NotificationIconContainer. Not optimal but keeps the layout logic clean
        if (isLayoutRtl()) {
            for (int i = 0; i < childCount; i++) {
                View child = getChildAt(i);
                ViewState state = getViewStateFromChild(child);
                state.xTranslation = width - state.xTranslation - child.getWidth();
            }
        }
    }

    private void applyIconStates() {