From 4f9682e60cdffc289b55c62ffa6f6bfff6ac93b4 Mon Sep 17 00:00:00 2001 From: Roy Chou Date: Fri, 14 Jul 2023 05:56:44 +0000 Subject: [PATCH] fix(non linear font scaling): clock and battery textview might be cut off in status bar when large font scaling Originally system icons in status bar have fixed top and bottom 8dp paddings, when larger font scaling the space might not enough for enlarged textview then the percentage textview is cut off, as in b/291168760. Therefore, as a quick solution we let the status_bar system_icons layout height be a sp dimen value like combined_qs_header and set the top/bottom paddings in system_icons to 0dp. It's to ensure the system_icons layout height is larger than the status icons height. In the future cl, we would also ensure the status bar height should be enough for accommodating the system_icons. Bug: 291168760 Test: manually - attached screenshot in bug Change-Id: I070bf6d5faa858acfa4927a9590c4575dc91f2fe --- packages/SystemUI/res/layout/status_bar.xml | 9 +++++++-- packages/SystemUI/res/values/dimens.xml | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml index 0ab921f4d555f..5132e57e2786f 100644 --- a/packages/SystemUI/res/layout/status_bar.xml +++ b/packages/SystemUI/res/layout/status_bar.xml @@ -67,6 +67,7 @@ android:id="@+id/status_bar_start_side_content" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="center_vertical|start" android:clipChildren="false"> @@ -88,7 +89,8 @@ - + diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index de8287e5e8cbf..3d4e8cd567f54 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -121,6 +121,9 @@ 0dp 6dp + + @dimen/status_bar_icon_size_sp + @*android:dimen/status_bar_icon_size_sp @@ -343,8 +346,8 @@ 11dp 0dp - 8dp - 8dp + 0dp + 0dp 0sp