fix(UI): Apply window insets on welcome screens (#2734)

This commit is contained in:
Phil Oliver 2025-08-15 14:25:25 -04:00 committed by GitHub
parent 14422cd2c0
commit 570f323328
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 19 deletions

View file

@ -17,15 +17,13 @@
package com.geeksville.mesh.ui.intro
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.BottomAppBar
import androidx.compose.material3.Button
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
@ -47,17 +45,13 @@ internal fun IntroBottomBar(
configureButtonText: String,
showSkipButton: Boolean = true,
) {
Surface(shadowElevation = 8.dp) {
// Use Surface for elevation as per Material 3 guidelines
Row(
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 20.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = if (showSkipButton) Arrangement.SpaceBetween else Arrangement.End,
) {
if (showSkipButton) {
Button(onClick = onSkip) { Text(skipButtonText) }
}
Button(onClick = onConfigure) { Text(configureButtonText) }
BottomAppBar(contentPadding = PaddingValues(horizontal = 16.dp, vertical = 20.dp)) {
if (showSkipButton) {
Button(onClick = onSkip) { Text(skipButtonText) }
}
Spacer(modifier = Modifier.fillMaxWidth().weight(1f))
Button(onClick = onConfigure) { Text(configureButtonText) }
}
}