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

Commit 073d9495 authored by Caio Schnepper's avatar Caio Schnepper Committed by Gerrit Code Review
Browse files

Gallery2: Fix RTL album picking

The gallery picks the albums in inverted side while using RTL languages, this makes it correctly open the choosen album

Change-Id: I9e944731515514f00838c62b72900442461d4014
parent e8e6a116
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -625,12 +625,6 @@ public class SlotView extends GLView {
        public int getSlotIndexByPosition(float x, float y) {
            int absoluteX = Math.round(x) + (mIsWide ? mScrollPosition : 0);
            int absoluteY = Math.round(y) + (mIsWide ? 0 : mScrollPosition);
            if (View.LAYOUT_DIRECTION_RTL == TextUtils
                    .getLayoutDirectionFromLocale(Locale.getDefault())) {
                // If RTL, recalculate the absoluteX.
                absoluteX = mContentLength > mWidth ? (mContentLength - absoluteX) : mWidth
                        - absoluteX;
            }
            absoluteX -= mHorizontalPadding.get();
            absoluteY -= mVerticalPadding.get();