Skip to content

Commit

Permalink
base: Actually fix the padding on StatusBar
Browse files Browse the repository at this point in the history
Android P gets a new QS layout that looks good
but it has some issues on smaller screens devices,
like the rounded buttons clipping with the borders
and the date not looking really good.
LineageOS suggested a fix (https://review.lineageos.org/224021)
but it's circumventing it because it adds padding
 and some people doesn't like the padding, so, instead
let's apply the 8dp spacing over the affected headers
and the small qs tile.

Change-Id: I4c01945bfb3d9f58f10cd7deb392a2d40bc50289
Signed-off-by: VenkatVishalV <venkatvishal124@gmail.com>
  • Loading branch information
eldainosor authored and VenkatVishalV committed Sep 28, 2018
1 parent 5723ace commit 6c94536
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
android:layout_width="match_parent"
android:layout_height="@*android:dimen/quick_qs_total_height"
android:layout_gravity="@integer/notification_panel_layout_gravity"
android:layout_marginStart="@dimen/qs_items_padding"
android:layout_marginEnd="@dimen/qs_items_padding"
android:background="@android:color/transparent"
android:baselineAligned="false"
android:clickable="false"
Expand All @@ -47,6 +49,8 @@
android:layout_below="@id/quick_qs_status_icons"
android:layout_marginStart="@dimen/qs_header_tile_margin_horizontal"
android:layout_marginEnd="@dimen/qs_header_tile_margin_horizontal"
android:paddingLeft="@dimen/qs_items_padding"
android:paddingRight="@dimen/qs_items_padding"
android:accessibilityTraversalAfter="@+id/date_time_group"
android:accessibilityTraversalBefore="@id/expand_indicator"
android:clipChildren="false"
Expand Down
3 changes: 3 additions & 0 deletions packages/SystemUI/res/values/custom_dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@
<dimen name="opa_overshoot_translation">8.0dip</dimen>
<dimen name="opa_return_translation">-1.0dip</dimen>
<dimen name="opa_rest_to_collapse">7.0dip</dimen>

<!-- Sets a custom extra padding for the QS icons and statusbar date -->
<dimen name="qs_items_padding">8dp</dimen>
</resources>

0 comments on commit 6c94536

Please sign in to comment.