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

Commit f2c94fab authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Fix sizes and paddings

Fix size of brightness slider.

Also, align margins with notifications in:
* QQS
* QS
* QSCustomizer
* Brightness slider

Test: manual
Fixes: 183391158
Change-Id: I31a3b7f8d42186f2d2699f2fba71ee0dcc335bf9
parent d9fa336b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:autoMirrored="true">
    <item android:id="@+id/slider_foreground">
    <item android:id="@+id/slider_foreground"
        android:height="@dimen/rounded_slider_height">
        <shape>
            <size android:height="@dimen/rounded_slider_height" />
            <solid android:color="?android:attr/colorControlActivated" />
+3 −2
Original line number Diff line number Diff line
@@ -16,8 +16,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:layout_gravity="center"
    style="@style/BrightnessDialogContainer">
    android:layout_gravity="center">

    <com.android.systemui.settings.brightness.BrightnessSliderView
        android:id="@+id/brightness_slider"
@@ -35,6 +34,8 @@
            android:minHeight="48dp"
            android:thumb="@null"
            android:background="@null"
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:progressDrawable="@drawable/brightness_progress_drawable_thick"
            android:splitTrack="false"
        />
+7 −0
Original line number Diff line number Diff line
@@ -87,6 +87,10 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
                attrs, R.styleable.PagedTileLayout, 0, 0);
        mSideLabels = t.getBoolean(R.styleable.PagedTileLayout_sideLabels, false);
        t.recycle();
        if (mSideLabels) {
            setPageMargin(context.getResources().getDimensionPixelOffset(
                    R.dimen.qs_tile_margin_horizontal));
        }
    }
    private int mLastMaxHeight = -1;

@@ -341,6 +345,9 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
        // Update bottom padding, useful for removing extra space once the panel page indicator is
        // hidden.
        Resources res = getContext().getResources();
        if (mSideLabels) {
            setPageMargin(res.getDimensionPixelOffset(R.dimen.qs_tile_margin_horizontal));
        }
        setPadding(0, 0, 0,
                getContext().getResources().getDimensionPixelSize(
                        R.dimen.qs_paged_tile_layout_padding_bottom));
+8 −4
Original line number Diff line number Diff line
@@ -649,7 +649,7 @@ public class QSPanel extends LinearLayout implements Tunable {
        if (mFooter != null) {
            int footerMargin = 0;
            int indicatorMargin = 0;
            if (mUsingHorizontalLayout) {
            if (mUsingHorizontalLayout && !mSideLabels) {
                footerMargin = mFooterMarginStartHorizontal;
                indicatorMargin = footerMargin - mVisualMarginEnd;
            }
@@ -677,15 +677,19 @@ public class QSPanel extends LinearLayout implements Tunable {
    }

    public Pair<Integer, Integer> getVisualSideMargins() {
        if (mSideLabels) {
            return new Pair(0, 0);
        } else {
            return new Pair(mVisualMarginStart, mUsingHorizontalLayout ? 0 : mVisualMarginEnd);
        }
    }

    private void updateTileLayoutMargins() {
        int marginEnd = mVisualMarginEnd;
        if (mUsingHorizontalLayout) {
        if (mUsingHorizontalLayout || mSideLabels) {
            marginEnd = 0;
        }
        updateMargins((View) mTileLayout, mVisualMarginStart, marginEnd);
        updateMargins((View) mTileLayout, mSideLabels ? 0 : mVisualMarginStart, marginEnd);
    }

    private void updateDividerMargin() {
+12 −12
Original line number Diff line number Diff line
@@ -370,20 +370,20 @@ public class QuickStatusBarHeader extends FrameLayout {
            QuickQSPanelController quickQSPanelController) {
        mContentMarginStart = marginStart;
        mContentMarginEnd = marginEnd;
        for (int i = 0; i < getChildCount(); i++) {
            View view = getChildAt(i);
            if (view == mHeaderQsPanel) {
                // QS panel doesn't lays out some of its content full width
                quickQSPanelController.setContentMargins(marginStart, marginEnd);
            } else {
        // The clock and QQS are not direct children, but the container should be just a wrapper to
        // be able to move them together. So we set the margins to the actual views.
        quickQSPanelController.setContentMargins(0, 0);
        setContentMargins(mDatePrivacyView, marginStart, marginEnd);
        setContentMargins(mClockIconsView, marginStart, marginEnd);
        updateHeadersPadding();
    }

    private void setContentMargins(View view, int marginStart, int marginEnd) {
        MarginLayoutParams lp = (MarginLayoutParams) view.getLayoutParams();
        lp.setMarginStart(marginStart);
        lp.setMarginEnd(marginEnd);
        view.setLayoutParams(lp);
    }
        }
        updateHeadersPadding();
    }

    /**
     * When QS is scrolling, mClockIconsAlpha should scroll away and fade out.
Loading