Improved design of Settings dialog
This commit is contained in:
parent
71f336533a
commit
115a195a61
@ -70,7 +70,6 @@ fun AppTab(
|
||||
|
||||
Box(modifier = Modifier.fillMaxSize()) {
|
||||
Crossfade(targetState = repositorySelectionStatus) {
|
||||
@Suppress("UnnecessaryVariable") // Don't inline it because smart cast won't work
|
||||
when (repositorySelectionStatusValue) {
|
||||
RepositorySelectionStatus.None -> {
|
||||
WelcomePage(tabViewModel = tabViewModel)
|
||||
|
@ -50,7 +50,7 @@ fun AdjustableOutlinedTextField(
|
||||
|
||||
BasicTextField(
|
||||
modifier = modifier
|
||||
.heightIn(min = 48.dp)
|
||||
.heightIn(min = 40.dp)
|
||||
.background(backgroundColor),
|
||||
value = value,
|
||||
onValueChange = onValueChange,
|
||||
@ -69,7 +69,7 @@ fun AdjustableOutlinedTextField(
|
||||
color = indicatorColor,
|
||||
shape = shape
|
||||
)
|
||||
.padding(12.dp),
|
||||
.padding(horizontal = 12.dp),
|
||||
contentAlignment = Alignment.CenterStart,
|
||||
) {
|
||||
innerTextField()
|
||||
|
@ -8,6 +8,7 @@ import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -61,6 +62,7 @@ fun SettingsDialog(
|
||||
Text(
|
||||
text = "Settings",
|
||||
style = MaterialTheme.typography.h3,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
modifier = Modifier.padding(top = 8.dp, bottom = 16.dp)
|
||||
)
|
||||
|
||||
@ -110,7 +112,6 @@ fun SettingsDialog(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,6 +247,7 @@ fun Category(
|
||||
.handMouseClickable(onClick)
|
||||
.padding(8.dp),
|
||||
style = MaterialTheme.typography.body1,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
)
|
||||
}
|
||||
|
||||
@ -271,12 +273,20 @@ fun <T : DropDownOption> SettingDropDown(
|
||||
OutlinedButton(
|
||||
onClick = { showThemeDropdown = true },
|
||||
colors = ButtonDefaults.outlinedButtonColors(backgroundColor = MaterialTheme.colors.background),
|
||||
modifier = Modifier.widthIn(min = 120.dp)
|
||||
modifier = Modifier.width(180.dp)
|
||||
) {
|
||||
Text(
|
||||
text = currentOption.optionName,
|
||||
style = MaterialTheme.typography.body1,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
modifier = Modifier.weight(1f),
|
||||
maxLines = 1
|
||||
)
|
||||
|
||||
Icon(
|
||||
painter = painterResource("dropdown.svg"),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
)
|
||||
}
|
||||
|
||||
|
1
src/main/resources/dropdown.svg
Normal file
1
src/main/resources/dropdown.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>
|
After Width: | Height: | Size: 175 B |
Loading…
Reference in New Issue
Block a user