From 293901a87e142be1bd31fcac64b1020a7ead7477 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 19:16:50 +0000 Subject: [PATCH] fix: add system bar insets to call screen elements Call screen elements were too close to the screen edges because they didn't account for status bar and navigation bar insets. Apply WindowInsets.statusBars and WindowInsets.navigationBars padding to all call screen layouts while keeping video backgrounds full-bleed. https://claude.ai/code/session_014espsysob7MrE8X8e75jFX --- .../amethyst/ui/call/CallScreen.kt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt index 30ed7e3b6..01398aa04 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt @@ -28,11 +28,15 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBars +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.BluetoothAudio @@ -201,7 +205,9 @@ private fun CallInProgressUI( modifier = Modifier .fillMaxSize() - .background(MaterialTheme.colorScheme.surface), + .background(MaterialTheme.colorScheme.surface) + .windowInsetsPadding(WindowInsets.statusBars) + .windowInsetsPadding(WindowInsets.navigationBars), contentAlignment = Alignment.Center, ) { Column( @@ -259,7 +265,9 @@ private fun IncomingCallUI( modifier = Modifier .fillMaxSize() - .background(MaterialTheme.colorScheme.surface), + .background(MaterialTheme.colorScheme.surface) + .windowInsetsPadding(WindowInsets.statusBars) + .windowInsetsPadding(WindowInsets.navigationBars), contentAlignment = Alignment.Center, ) { Column( @@ -387,6 +395,7 @@ private fun ConnectedCallUI( Modifier .size(120.dp, 160.dp) .align(Alignment.TopEnd) + .windowInsetsPadding(WindowInsets.statusBars) .padding(16.dp), mirror = true, ) @@ -432,7 +441,8 @@ private fun ConnectedCallUI( modifier = Modifier .align(Alignment.TopCenter) - .padding(top = 48.dp), + .windowInsetsPadding(WindowInsets.statusBars) + .padding(top = 16.dp), ) } @@ -441,7 +451,8 @@ private fun ConnectedCallUI( modifier = Modifier .align(Alignment.BottomCenter) - .padding(bottom = 48.dp), + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(bottom = 24.dp), horizontalAlignment = Alignment.CenterHorizontally, ) { Row(