Skip to content

Commit fa6c77d

Browse files
committed
color behind the gesture bar on the home screen
1 parent a39b793 commit fa6c77d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

app/src/main/java/io/github/sds100/keymapper/home/HomeKeyMapListScreen.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ import androidx.compose.animation.slideInVertically
1212
import androidx.compose.animation.slideOutHorizontally
1313
import androidx.compose.animation.slideOutVertically
1414
import androidx.compose.foundation.layout.Box
15+
import androidx.compose.foundation.layout.WindowInsets
16+
import androidx.compose.foundation.layout.WindowInsetsSides
17+
import androidx.compose.foundation.layout.only
1518
import androidx.compose.foundation.layout.padding
19+
import androidx.compose.foundation.layout.safeDrawing
1620
import androidx.compose.foundation.layout.systemBarsPadding
21+
import androidx.compose.foundation.layout.windowInsetsPadding
1722
import androidx.compose.foundation.lazy.rememberLazyListState
1823
import androidx.compose.material.icons.Icons
1924
import androidx.compose.material.icons.automirrored.outlined.ArrowForward
@@ -156,7 +161,9 @@ fun HomeKeyMapListScreen(
156161
exit = fadeOut() + slideOutHorizontally(targetOffsetX = { it }),
157162
) {
158163
CollapsableFloatingActionButton(
159-
modifier = Modifier.padding(bottom = fabBottomPadding),
164+
modifier = Modifier
165+
.padding(bottom = fabBottomPadding)
166+
.windowInsetsPadding(WindowInsets.safeDrawing.only(WindowInsetsSides.End)),
160167
onClick = viewModel::onNewKeyMapClick,
161168
showText = viewModel.showFabText,
162169
text = stringResource(R.string.home_fab_new_key_map),

app/src/main/java/io/github/sds100/keymapper/home/HomeScreen.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.WindowInsetsSides
1212
import androidx.compose.foundation.layout.displayCutout
1313
import androidx.compose.foundation.layout.fillMaxSize
1414
import androidx.compose.foundation.layout.height
15-
import androidx.compose.foundation.layout.navigationBarsPadding
1615
import androidx.compose.foundation.layout.only
1716
import androidx.compose.foundation.layout.padding
1817
import androidx.compose.foundation.layout.windowInsetsPadding
@@ -106,8 +105,7 @@ private fun HomeScreen(
106105

107106
Column(
108107
modifier // Only take the horizontal because the status bar is the same color as the app bar
109-
.windowInsetsPadding(WindowInsets.displayCutout.only(WindowInsetsSides.Horizontal))
110-
.navigationBarsPadding(),
108+
.windowInsetsPadding(WindowInsets.displayCutout.only(WindowInsetsSides.Horizontal)),
111109
) {
112110
Box(contentAlignment = Alignment.BottomCenter) {
113111
NavHost(

0 commit comments

Comments
 (0)