Skip to content

Commit 2b11ee4

Browse files
committed
fix: center the empty key map list text
1 parent 7c7a013 commit 2b11ee4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import androidx.compose.ui.layout.onSizeChanged
4141
import androidx.compose.ui.platform.LocalContext
4242
import androidx.compose.ui.platform.LocalUriHandler
4343
import androidx.compose.ui.res.stringResource
44+
import androidx.compose.ui.tooling.preview.Devices
4445
import androidx.compose.ui.tooling.preview.Preview
4546
import androidx.compose.ui.unit.Dp
4647
import androidx.compose.ui.unit.dp
@@ -641,7 +642,7 @@ private fun PreviewKeyMapsWarnings() {
641642
}
642643

643644
@OptIn(ExperimentalMaterial3Api::class)
644-
@Preview
645+
@Preview(device = Devices.PIXEL)
645646
@Composable
646647
private fun PreviewKeyMapsWarningsEmpty() {
647648
val warnings = listOf(

app/src/main/java/io/github/sds100/keymapper/mappings/keymaps/KeyMapListScreen.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ fun KeyMapList(
9090
is State.Data -> {
9191
Surface(modifier = modifier) {
9292
if (listItems.data.isEmpty()) {
93-
EmptyKeyMapList(modifier = Modifier.fillMaxSize())
93+
EmptyKeyMapList(
94+
modifier = Modifier.fillMaxSize().padding(bottom = bottomListPadding),
95+
)
9496
} else {
9597
LoadedKeyMapList(
9698
Modifier.fillMaxSize(),

0 commit comments

Comments
 (0)