Remove imePadding modifier to internal scaffold box (#1771)

pull/1777/head
Joshua Soberg 2025-04-21 18:11:56 -04:00 zatwierdzone przez GitHub
rodzic d3cfc46148
commit edb514af64
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 7 usunięć

Wyświetl plik

@ -19,8 +19,6 @@ package com.geeksville.mesh.ui.components
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.material.FabPosition import androidx.compose.material.FabPosition
import androidx.compose.material.Icon import androidx.compose.material.Icon
@ -50,7 +48,6 @@ internal fun BaseScaffold(
actions: @Composable (RowScope.() -> Unit)? = null, actions: @Composable (RowScope.() -> Unit)? = null,
floatingActionButton: @Composable () -> Unit = {}, floatingActionButton: @Composable () -> Unit = {},
floatingActionButtonPosition: FabPosition = FabPosition.End, floatingActionButtonPosition: FabPosition = FabPosition.End,
contentWindowInsets: WindowInsets = WindowInsets(0, 0, 0, 0),
content: @Composable () -> Unit, content: @Composable () -> Unit,
) { ) {
BaseScaffold( BaseScaffold(
@ -76,7 +73,6 @@ internal fun BaseScaffold(
}, },
floatingActionButton = floatingActionButton, floatingActionButton = floatingActionButton,
floatingActionButtonPosition = floatingActionButtonPosition, floatingActionButtonPosition = floatingActionButtonPosition,
contentWindowInsets = contentWindowInsets,
content = content content = content
) )
} }
@ -91,11 +87,10 @@ internal fun BaseScaffold(
floatingActionButtonPosition: FabPosition = FabPosition.End, floatingActionButtonPosition: FabPosition = FabPosition.End,
backgroundColor: Color = MaterialTheme.colors.background, backgroundColor: Color = MaterialTheme.colors.background,
contentColor: Color = contentColorFor(backgroundColor), contentColor: Color = contentColorFor(backgroundColor),
contentWindowInsets: WindowInsets = WindowInsets(0, 0, 0, 0),
content: @Composable () -> Unit, content: @Composable () -> Unit,
) { ) {
Scaffold( Scaffold(
modifier = modifier.imePadding(), modifier = modifier,
topBar = topBar, topBar = topBar,
bottomBar = bottomBar, bottomBar = bottomBar,
snackbarHost = snackbarHost, snackbarHost = snackbarHost,
@ -103,7 +98,6 @@ internal fun BaseScaffold(
floatingActionButtonPosition = floatingActionButtonPosition, floatingActionButtonPosition = floatingActionButtonPosition,
backgroundColor = backgroundColor, backgroundColor = backgroundColor,
contentColor = contentColor, contentColor = contentColor,
contentWindowInsets = contentWindowInsets,
) { innerPadding -> ) { innerPadding ->
Box(modifier = Modifier.padding(innerPadding)) { Box(modifier = Modifier.padding(innerPadding)) {
content() content()