Skip to content
Snippets Groups Projects
Commit f7ca151e authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Fix setup looking weird on some devices

parent e424f365
No related branches found
No related tags found
1 merge request!7Merge model-metadata to master
......@@ -11,7 +11,7 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
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.fillMaxWidth
import androidx.compose.foundation.layout.padding
......@@ -38,30 +38,29 @@ import org.futo.inputmethod.latin.uix.theme.Typography
@Composable
fun SetupContainer(inner: @Composable () -> Unit) {
Box(modifier = Modifier.fillMaxSize()) {
Column(
Column(modifier = Modifier.fillMaxSize()) {
Box(
modifier = Modifier
.fillMaxWidth(fraction = 1.0f)
.fillMaxHeight(fraction = 0.4f)
.fillMaxWidth()
.weight(0.75f)
) {
Icon(
painter = painterResource(id = R.drawable.futo_logo),
painter = painterResource(id = R.drawable.ic_launcher_foreground),
contentDescription = "FUTO Logo",
modifier = Modifier
.fillMaxHeight()
.fillMaxWidth(0.75f)
.align(Alignment.CenterHorizontally),
.matchParentSize()
.align(Alignment.Center),
tint = MaterialTheme.colorScheme.onBackground
)
}
Row(
modifier = Modifier.fillMaxSize()
modifier = Modifier
.fillMaxWidth()
) {
Row(
modifier = Modifier
.fillMaxWidth()
.fillMaxHeight(fraction = 0.5f)
.align(Alignment.CenterVertically)
.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 {
Column {
Step(fraction = 0.9f, text = "Step 3 of 3")
Step(fraction = 0.9f, text = "Setup - Step 3 of 3")
Text(
"Choose whether you want to use built-in voice input, or the system voice input.",
textAlign = TextAlign.Center,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment