From 152db50e94e43f355b58833546230a4db00cc5ad Mon Sep 17 00:00:00 2001 From: Miranda Kephart Date: Thu, 21 Nov 2024 13:16:15 -0500 Subject: Inset screenshot UI from the nav bar In seascape, the screenshot UI overlaps the nav bar (especially visible in 3-button mode). This change adds the nav bar insets to the screenshot padding. Bug: 380280383 Fix: 380280383 Test: manual (visual change) Flag: EXEMPT bugfix Change-Id: Ib2a683040bc9b1ee43831e89abf379163774bdb4 --- .../com/android/systemui/screenshot/ui/ScreenshotShelfView.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt b/packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt index b8ea8f9052ca..c58b48122f63 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt @@ -147,7 +147,12 @@ class ScreenshotShelfView(context: Context, attrs: AttributeSet? = null) : ) if (cutout == null) { - screenshotStatic.setPadding(0, 0, 0, navBarInsets.bottom) + screenshotStatic.setPadding( + navBarInsets.left, + navBarInsets.top, + navBarInsets.right, + navBarInsets.bottom, + ) } else { val waterfall = cutout.waterfallInsets if (inPortrait) { @@ -164,9 +169,9 @@ class ScreenshotShelfView(context: Context, attrs: AttributeSet? = null) : ) } else { screenshotStatic.setPadding( - max(cutout.safeInsetLeft, waterfall.left), + max(cutout.safeInsetLeft, waterfall.left, navBarInsets.left), waterfall.top, - max(cutout.safeInsetRight, waterfall.right), + max(cutout.safeInsetRight, waterfall.right, navBarInsets.right), max( navBarInsets.bottom + verticalPadding, waterfall.bottom + verticalPadding, -- cgit v1.2.3-59-g8ed1b