mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 08:45:27 +02:00
Tiny padding fixes
Input and output text fields now occupy full screen width
This commit is contained in:
parent
8e928d44bf
commit
d90ae9220a
@ -91,10 +91,8 @@ fun MainScreen(
|
|||||||
navControllerAction = { navControllerAction(it) },
|
navControllerAction = { navControllerAction(it) },
|
||||||
swapMeasurements = { viewModel.swapUnits() },
|
swapMeasurements = { viewModel.swapUnits() },
|
||||||
processInput = { viewModel.processInput(it) },
|
processInput = { viewModel.processInput(it) },
|
||||||
deleteDigit = { viewModel.deleteDigit() },
|
deleteDigit = { viewModel.deleteDigit() }
|
||||||
clearInput = { viewModel.clearInput() },
|
) { viewModel.clearInput() }
|
||||||
negateInput = { viewModel.negateInput() }
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -121,14 +119,12 @@ private fun PortraitMainScreenContent(
|
|||||||
processInput: (String) -> Unit = {},
|
processInput: (String) -> Unit = {},
|
||||||
deleteDigit: () -> Unit = {},
|
deleteDigit: () -> Unit = {},
|
||||||
clearInput: () -> Unit = {},
|
clearInput: () -> Unit = {},
|
||||||
negateInput: () -> Unit = {},
|
|
||||||
) {
|
) {
|
||||||
if (portrait) {
|
if (portrait) {
|
||||||
Column(
|
Column(
|
||||||
modifier
|
modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize(),
|
||||||
.padding(8.dp),
|
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
verticalArrangement = Arrangement.spacedBy(24.dp)
|
|
||||||
) {
|
) {
|
||||||
TopScreenPart(
|
TopScreenPart(
|
||||||
modifier = Modifier,
|
modifier = Modifier,
|
||||||
@ -146,7 +142,8 @@ private fun PortraitMainScreenContent(
|
|||||||
// Keyboard which takes half the screen
|
// Keyboard which takes half the screen
|
||||||
Keyboard(
|
Keyboard(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxSize(),
|
.fillMaxSize()
|
||||||
|
.padding(horizontal = 8.dp),
|
||||||
addDigit = processInput,
|
addDigit = processInput,
|
||||||
deleteDigit = deleteDigit,
|
deleteDigit = deleteDigit,
|
||||||
clearInput = clearInput,
|
clearInput = clearInput,
|
||||||
@ -157,8 +154,7 @@ private fun PortraitMainScreenContent(
|
|||||||
} else {
|
} else {
|
||||||
Row(
|
Row(
|
||||||
modifier
|
modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize(),
|
||||||
.padding(8.dp),
|
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
) {
|
) {
|
||||||
TopScreenPart(
|
TopScreenPart(
|
||||||
@ -181,7 +177,8 @@ private fun PortraitMainScreenContent(
|
|||||||
Keyboard(
|
Keyboard(
|
||||||
Modifier
|
Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.fillMaxSize(),
|
.fillMaxSize()
|
||||||
|
.padding(horizontal = 8.dp),
|
||||||
addDigit = processInput,
|
addDigit = processInput,
|
||||||
deleteDigit = deleteDigit,
|
deleteDigit = deleteDigit,
|
||||||
clearInput = clearInput,
|
clearInput = clearInput,
|
||||||
|
@ -21,10 +21,7 @@ package com.sadellie.unitto.screens.main.components
|
|||||||
import androidx.compose.animation.core.FastOutSlowInEasing
|
import androidx.compose.animation.core.FastOutSlowInEasing
|
||||||
import androidx.compose.animation.core.animateFloatAsState
|
import androidx.compose.animation.core.animateFloatAsState
|
||||||
import androidx.compose.animation.core.tween
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.layout.Column
|
|
||||||
import androidx.compose.foundation.layout.Row
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.SwapHoriz
|
import androidx.compose.material.icons.outlined.SwapHoriz
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
@ -105,7 +102,7 @@ fun TopScreenPart(
|
|||||||
)
|
)
|
||||||
// Unit selection buttons
|
// Unit selection buttons
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier,
|
modifier = Modifier.padding(horizontal = 8.dp),
|
||||||
verticalAlignment = Alignment.Bottom,
|
verticalAlignment = Alignment.Bottom,
|
||||||
) {
|
) {
|
||||||
UnitSelectionButton(
|
UnitSelectionButton(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user