Swap top and bar bottom buttons in settings (#39)
This commit is contained in:
parent
b176b91f66
commit
807623d04a
@ -276,25 +276,6 @@ fun MainScreen(onFinish: () -> Unit) {
|
||||
.verticalScroll(rememberScrollState())
|
||||
.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
|
||||
FilledTonalButton(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(60.dp),
|
||||
onClick = {
|
||||
bottomBarDialogVisible = true
|
||||
}) {
|
||||
Icon(Icons.Default.Build, contentDescription = "Select", modifier = Modifier.size(20.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text("Bottom Bar: ${bottomSelectedSource.label}", modifier = Modifier.weight(1.0f))
|
||||
}
|
||||
|
||||
if (bottomBarDialogVisible){
|
||||
BarSelectDialog(bottomSelectedSource, onHide = { bottomBarDialogVisible = false }, onSelect = { selected ->
|
||||
bottomSelectedSource = selected
|
||||
coroutineScope.launch { updateSettings() }
|
||||
bottomBarDialogVisible = false
|
||||
})
|
||||
}
|
||||
|
||||
FilledTonalButton(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(60.dp),
|
||||
@ -314,6 +295,25 @@ fun MainScreen(onFinish: () -> Unit) {
|
||||
})
|
||||
}
|
||||
|
||||
FilledTonalButton(modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(60.dp),
|
||||
onClick = {
|
||||
bottomBarDialogVisible = true
|
||||
}) {
|
||||
Icon(Icons.Default.Build, contentDescription = "Select", modifier = Modifier.size(20.dp))
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text("Bottom Bar: ${bottomSelectedSource.label}", modifier = Modifier.weight(1.0f))
|
||||
}
|
||||
|
||||
if (bottomBarDialogVisible){
|
||||
BarSelectDialog(bottomSelectedSource, onHide = { bottomBarDialogVisible = false }, onSelect = { selected ->
|
||||
bottomSelectedSource = selected
|
||||
coroutineScope.launch { updateSettings() }
|
||||
bottomBarDialogVisible = false
|
||||
})
|
||||
}
|
||||
|
||||
apply {
|
||||
val dropdownOptions = CustomProgressBarBarSize.entries.toList().map { unit -> DropdownOption(unit.id, unit.label) }
|
||||
val dropdownInitialSelection by remember(barBarSize) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user