mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Tweak settings footer button style/visibility (#3458)
This commit is contained in:
parent
43400f8d61
commit
273772b214
3 changed files with 60 additions and 22 deletions
|
|
@ -23,8 +23,8 @@ import androidx.compose.foundation.layout.Row
|
|||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.OutlinedButton
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.ElevatedButton
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
|
|
@ -63,14 +63,22 @@ fun PreferenceFooter(
|
|||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Row(
|
||||
modifier = modifier.fillMaxWidth().padding(16.dp),
|
||||
modifier = modifier.fillMaxWidth().padding(horizontal = 24.dp, vertical = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
OutlinedButton(modifier = Modifier.height(48.dp).weight(1f), onClick = onNegativeClicked) {
|
||||
ElevatedButton(
|
||||
modifier = Modifier.height(48.dp).weight(1f),
|
||||
colors = ButtonDefaults.filledTonalButtonColors(),
|
||||
onClick = onNegativeClicked,
|
||||
) {
|
||||
Text(text = negativeText)
|
||||
}
|
||||
Button(modifier = Modifier.height(48.dp).weight(1f), enabled = enabled, onClick = onPositiveClicked) {
|
||||
ElevatedButton(
|
||||
modifier = Modifier.height(48.dp).weight(1f),
|
||||
colors = ButtonDefaults.buttonColors(),
|
||||
onClick = { if (enabled) onPositiveClicked() },
|
||||
) {
|
||||
Text(text = positiveText)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue