diff options
| author | 2024-11-21 13:16:15 -0500 | |
|---|---|---|
| committer | 2024-11-21 13:19:28 -0500 | |
| commit | 152db50e94e43f355b58833546230a4db00cc5ad (patch) | |
| tree | b8275d87c15d2db1ec7f5181b2225d205ffc2af5 | |
| parent | d322e4e79b63d6a456ea9f6aa5921b9637194596 (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/screenshot/ui/ScreenshotShelfView.kt | 11 |
1 files 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, |