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

Commit 3f0e9c43 authored by Luca Zuccarini's avatar Luca Zuccarini Committed by Automerger Merge Worker
Browse files

Merge "Ensure that the Hotseat respects the margins of the QSB." into tm-dev am: 76263c2d

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

Change-Id: Ie37c42d01fa08b7862dbb7da04dd180afc6fb7cb
parents df713b70 76263c2d
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -173,9 +173,15 @@ public class Hotseat extends CellLayout implements Insettable {
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);

        int width = mActivity.getDeviceProfile().isQsbInline
                ? mActivity.getDeviceProfile().qsbWidth
                : getShortcutsAndWidgets().getMeasuredWidth();
        int width;
        if (mActivity.getDeviceProfile().isQsbInline) {
            width = mActivity.getDeviceProfile().qsbWidth;
        } else {
            MarginLayoutParams qsbParams = (MarginLayoutParams) mQsb.getLayoutParams();
            width = getShortcutsAndWidgets().getMeasuredWidth()
                    - qsbParams.getMarginStart()
                    - qsbParams.getMarginEnd();
        }

        mQsb.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
                MeasureSpec.makeMeasureSpec(mQsbHeight, MeasureSpec.EXACTLY));