Fix bottom search insets
This commit is contained in:
parent
a24d1b8798
commit
8ba12ce107
@ -1389,16 +1389,13 @@ internal fun LauncherScaffold(
|
|||||||
) {
|
) {
|
||||||
val searchBarInsets = WindowInsets(
|
val searchBarInsets = WindowInsets(
|
||||||
top = if (config.searchBarPosition == SearchBarPosition.Top) searchBarHeight + 8.dp else 8.dp,
|
top = if (config.searchBarPosition == SearchBarPosition.Top) searchBarHeight + 8.dp else 8.dp,
|
||||||
bottom = (if (config.searchBarPosition == SearchBarPosition.Bottom) searchBarHeight + 8.dp else 8.dp) +
|
bottom = if (config.searchBarPosition == SearchBarPosition.Bottom) searchBarHeight + 8.dp else 8.dp
|
||||||
filterBarHeight
|
|
||||||
)
|
)
|
||||||
|
|
||||||
val filterBarInsets = WindowInsets(
|
val filterBarInsets = WindowInsets(
|
||||||
bottom = filterBarHeight
|
bottom = filterBarHeight
|
||||||
)
|
)
|
||||||
|
|
||||||
val insets = systemBarInsets.add(searchBarInsets).add(filterBarInsets)
|
|
||||||
|
|
||||||
config.homeComponent.Component(
|
config.homeComponent.Component(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
@ -1424,12 +1421,12 @@ internal fun LauncherScaffold(
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
insets = systemBarInsets
|
insets = systemBarInsets
|
||||||
|
.let { if (config.homeComponent.hasIme) it.union(WindowInsets.ime) else it }
|
||||||
.let {
|
.let {
|
||||||
if (config.searchBarStyle == SearchBarStyle.Hidden) it else it.add(
|
if (config.searchBarStyle == SearchBarStyle.Hidden) it else it.add(
|
||||||
searchBarInsets
|
searchBarInsets
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.let { if (config.homeComponent.hasIme) it.union(WindowInsets.ime) else it }
|
|
||||||
.asPaddingValues(),
|
.asPaddingValues(),
|
||||||
state
|
state
|
||||||
)
|
)
|
||||||
@ -1439,8 +1436,9 @@ internal fun LauncherScaffold(
|
|||||||
config = config,
|
config = config,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize(),
|
.fillMaxSize(),
|
||||||
insets = insets
|
insets = systemBarInsets
|
||||||
.let { if (state.currentComponent?.hasIme == true) it.union(WindowInsets.ime) else it }
|
.let { if (state.currentComponent?.hasIme == true) it.union(WindowInsets.ime) else it }
|
||||||
|
.add(searchBarInsets).add(filterBarInsets)
|
||||||
.asPaddingValues(),
|
.asPaddingValues(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user