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

Commit 15ab7a24 authored by Jagrut Desai's avatar Jagrut Desai Committed by Automerger Merge Worker
Browse files

Merge "Correcting Taskbar Icon Layout bounds when Taskbar Divider is present"...

Merge "Correcting Taskbar Icon Layout bounds when Taskbar Divider is present" into udc-qpr-dev am: d34fe6d6 am: 14b1fdfb

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24449989



Change-Id: I18e197ed288d1e5835bb5aeb32c29fda433e0ca7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e198d44e 14b1fdfb
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -386,11 +386,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        int count = getChildCount();
        DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
        int spaceNeeded = getIconLayoutWidth();
        // We are removing the margin from taskbar divider item in taskbar,
        // so remove it from spacing also.
        if (FeatureFlags.ENABLE_TASKBAR_PINNING.get() && count > 1) {
            spaceNeeded -= mIconTouchSize;
        }
        int navSpaceNeeded = deviceProfile.hotseatBarEndOffset;
        boolean layoutRtl = isLayoutRtl();
        int centerAlignIconEnd = right - (right - left - spaceNeeded) / 2;
@@ -511,7 +506,15 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        if (deviceProfile.isQsbInline) {
            countExcludingQsb--;
        }
        return countExcludingQsb * (mItemMarginLeftRight * 2 + mIconTouchSize);
        int iconLayoutBoundsWidth =
                countExcludingQsb * (mItemMarginLeftRight * 2 + mIconTouchSize);

        if (FeatureFlags.ENABLE_TASKBAR_PINNING.get() && countExcludingQsb > 1) {
            // We are removing 4 * mItemMarginLeftRight as there should be no space between
            // All Apps icon, divider icon, and first app icon in taskbar
            iconLayoutBoundsWidth -= mItemMarginLeftRight * 4;
        }
        return iconLayoutBoundsWidth;
    }

    /**