kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Remove imePadding modifier to internal scaffold box (#1771)
rodzic
d3cfc46148
commit
edb514af64
|
@ -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()
|
||||||
|
|
Ładowanie…
Reference in New Issue