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

Commit ed83ebc8 authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: initialize drag panel with proper column count



Otherwise first layout can lead to awkward layout with two rows.

Ref: CYNGNOS-1601

Change-Id: Ia80b1ea7dba282e695d2b967cc1d7ed876529618
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 1a99a4a4
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -752,7 +752,8 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
        mPageIndicator.measure(exactly(width), atMost(mPageIndicatorHeight));
        mFooter.getView().measure(exactly(width), MeasureSpec.UNSPECIFIED);

        int h = mViewPager.getMeasuredHeight() + mPageIndicatorHeight;
        int h = getRowTop(getCurrentMaxRow() + 1) + mPanelPaddingBottom;

        if (mFooter.hasFooter()) {
            h += mFooter.getView().getMeasuredHeight();
        }
@@ -1730,11 +1731,11 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
        mDualTileUnderlap = res.getDimensionPixelSize(R.dimen.qs_dual_tile_padding_vertical);
        mBrightnessPaddingTop = res.getDimensionPixelSize(R.dimen.qs_brightness_padding_top);
        mPageIndicatorHeight = res.getDimensionPixelSize(R.dimen.qs_panel_page_indicator_height);
        if (isLaidOut()) {
        if (mColumns != columns) {
            mColumns = columns;
                postInvalidate();
            if (isLaidOut()) postInvalidate();
        }
        if (isLaidOut()) {
            for (TileRecord r : mRecords) {
                r.tile.clearState();
            }