summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDanny Lin <danny@kdrag0n.dev>2021-10-22 17:32:00 -0700
committeralk3pInjection <webmaster@raspii.tech>2022-05-07 00:20:58 +0800
commitfa799a9081aa0912598a3a88f13ca456964bf718 (patch)
tree813b8dbda49aec6d8641d9b9280209035feb4746 /packages
parent521bc0a65378c3f61f7ebe6dd040ffcda1d371e0 (diff)
SystemUI: Update keyguard clock metrics for Inter font
Font metrics are used to calculate the big keyguard clock's pivot point. Update the metrics to match our clock font, Inter, in order to fix clock misalignment as compared to using Roboto's metrics for Inter. New metrics, mostly from the Inter readme [1]: - UPM = 2816 - Cap height = 2048 - Total height = 3072 (from ttx-decompiled yMax) [1] https://github.com/rsms/inter#design Change-Id: I88129acf00dac487a111cd0b71871838dc3e9c93
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
index 11a0c7e93488..3c7389ad0c0b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
@@ -264,10 +264,10 @@ public class NotificationPanelViewController extends PanelViewController {
private final NotificationStackScrollLayoutController mNotificationStackScrollLayoutController;
private final NotificationIconAreaController mNotificationIconAreaController;
- // Cap and total height of Roboto font. Needs to be adjusted when font for the big clock is
+ // Cap and total height of Inter font. Needs to be adjusted when font for the big clock is
// changed.
- private static final int CAP_HEIGHT = 1456;
- private static final int FONT_HEIGHT = 2163;
+ private static final int CAP_HEIGHT = 2048;
+ private static final int FONT_HEIGHT = 3072;
/**
* Maximum time before which we will expand the panel even for slow motions when getting a
@@ -4640,7 +4640,7 @@ public class NotificationPanelViewController extends PanelViewController {
// Update Clock Pivot
mKeyguardStatusViewController.setPivotX(mView.getWidth() / 2);
mKeyguardStatusViewController.setPivotY(
- (FONT_HEIGHT - CAP_HEIGHT) / 2048f
+ (FONT_HEIGHT - CAP_HEIGHT) / 2816f
* mKeyguardStatusViewController.getClockTextSize());
// Calculate quick setting heights.