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

Commit 7a4e3312 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Remove config specific size for HeaderTileLayout

HeaderTileLayout width should always be MATCH_PARENT. The width is
controlled at the QSContainerImpl level by making it the width of
notification panel and it's MATCH_PARENT all the way down.

Test: visual, using emulator on really high density screen and phone
Fixes: 128776927
Change-Id: I3d5dc679cb77fb50ccadd6c3cb86a022e5f02f70
parent 18184f9c
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -19,8 +19,5 @@
    <!-- Standard notification width + gravity for tablet large screen device -->
    <dimen name="notification_panel_width">544dp</dimen>

    <!-- Maximum width of quick quick settings panel. -->
    <dimen name="qs_quick_layout_width">478dp</dimen>

</resources>
+0 −2
Original line number Diff line number Diff line
@@ -19,6 +19,4 @@
    <!-- Standard notification width + gravity -->
    <dimen name="notification_panel_width">544dp</dimen>

    <!-- Maximum width of quick quick settings panel. -->
    <dimen name="qs_quick_layout_width">478dp</dimen>
</resources>
+0 −2
Original line number Diff line number Diff line
@@ -418,8 +418,6 @@
    <dimen name="qs_tile_margin_top">18dp</dimen>
    <dimen name="qs_tile_background_size">44dp</dimen>
    <dimen name="qs_quick_tile_size">48dp</dimen>
    <!-- Maximum width of quick quick settings panel. Defaults to MATCH_PARENT-->
    <dimen name="qs_quick_layout_width">-1px</dimen>
    <dimen name="qs_quick_tile_padding">12dp</dimen>
    <dimen name="qs_header_gear_translation">16dp</dimen>
    <dimen name="qs_header_tile_margin_horizontal">4dp</dimen>
+4 −9
Original line number Diff line number Diff line
@@ -186,6 +186,10 @@ public class QuickQSPanel extends QSPanel {
            super(context);
            setClipChildren(false);
            setClipToPadding(false);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                    LayoutParams.MATCH_PARENT);
            lp.gravity = Gravity.CENTER_HORIZONTAL;
            setLayoutParams(lp);
        }

        @Override
@@ -199,13 +203,6 @@ public class QuickQSPanel extends QSPanel {
            updateResources();
        }

        private void updateLayoutParams() {
            int width = getResources().getDimensionPixelSize(R.dimen.qs_quick_layout_width);
            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(width, LayoutParams.MATCH_PARENT);
            lp.gravity = Gravity.CENTER_HORIZONTAL;
            setLayoutParams(lp);
        }

        private LayoutParams generateTileLayoutParams() {
            LayoutParams lp = new LayoutParams(mCellWidth, mCellHeight);
            return lp;
@@ -237,8 +234,6 @@ public class QuickQSPanel extends QSPanel {
            mCellWidth = mContext.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size);
            mCellHeight = mCellWidth;

            updateLayoutParams();

            return false;
        }