mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix setup looking weird on some devices
This commit is contained in:
parent
e424f36529
commit
f7ca151e18
@ -11,7 +11,7 @@ import androidx.activity.result.contract.ActivityResultContracts
|
|||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
@ -38,30 +38,29 @@ import org.futo.inputmethod.latin.uix.theme.Typography
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SetupContainer(inner: @Composable () -> Unit) {
|
fun SetupContainer(inner: @Composable () -> Unit) {
|
||||||
Box(modifier = Modifier.fillMaxSize()) {
|
Column(modifier = Modifier.fillMaxSize()) {
|
||||||
Column(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth(fraction = 1.0f)
|
.fillMaxWidth()
|
||||||
.fillMaxHeight(fraction = 0.4f)
|
.weight(0.75f)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(id = R.drawable.futo_logo),
|
painter = painterResource(id = R.drawable.ic_launcher_foreground),
|
||||||
contentDescription = "FUTO Logo",
|
contentDescription = "FUTO Logo",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxHeight()
|
.matchParentSize()
|
||||||
.fillMaxWidth(0.75f)
|
.align(Alignment.Center),
|
||||||
.align(Alignment.CenterHorizontally),
|
|
||||||
tint = MaterialTheme.colorScheme.onBackground
|
tint = MaterialTheme.colorScheme.onBackground
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxSize()
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.fillMaxHeight(fraction = 0.5f)
|
|
||||||
.align(Alignment.CenterVertically)
|
.align(Alignment.CenterVertically)
|
||||||
.padding(32.dp)
|
.padding(32.dp)
|
||||||
) {
|
) {
|
||||||
@ -70,6 +69,8 @@ fun SetupContainer(inner: @Composable () -> Unit) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.weight(0.25f))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +192,7 @@ fun SetupEnableMic(onClick: () -> Unit = { }) {
|
|||||||
|
|
||||||
SetupContainer {
|
SetupContainer {
|
||||||
Column {
|
Column {
|
||||||
Step(fraction = 0.9f, text = "Step 3 of 3")
|
Step(fraction = 0.9f, text = "Setup - Step 3 of 3")
|
||||||
Text(
|
Text(
|
||||||
"Choose whether you want to use built-in voice input, or the system voice input.",
|
"Choose whether you want to use built-in voice input, or the system voice input.",
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
|
Loading…
Reference in New Issue
Block a user