mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-19 07:15:25 +02:00
fix(ui): Improve colors
This commit is contained in:
parent
d88b03142f
commit
35cff4b6eb
@ -46,6 +46,9 @@ fun MicrophoneSelectionButton(
|
|||||||
.collectAsState(initial = AppSettings.getDefaultInstance())
|
.collectAsState(initial = AppSettings.getDefaultInstance())
|
||||||
.value
|
.value
|
||||||
|
|
||||||
|
// Copied from Android's [FilledButtonTokens]
|
||||||
|
val disabledTextColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f)
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
onClick = onSelect,
|
onClick = onSelect,
|
||||||
enabled = !disabled,
|
enabled = !disabled,
|
||||||
@ -72,7 +75,7 @@ fun MicrophoneSelectionButton(
|
|||||||
Text(
|
Text(
|
||||||
microphone.deviceInfo.address.toString(),
|
microphone.deviceInfo.address.toString(),
|
||||||
fontSize = MaterialTheme.typography.bodySmall.toSpanStyle().fontSize,
|
fontSize = MaterialTheme.typography.bodySmall.toSpanStyle().fontSize,
|
||||||
color = if (selected || disabled) MaterialTheme.colorScheme.onPrimary else MaterialTheme.colorScheme.secondary,
|
color = if (disabled) disabledTextColor else if (selected) MaterialTheme.colorScheme.onPrimary else MaterialTheme.colorScheme.secondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (selectedAsFallback)
|
if (selectedAsFallback)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user