mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
fix(ui): icons on tab dropdowns and in menu rows have their label's color (#3757)
This commit is contained in:
1 parent
0b7d7aa634
commit
6a6bab812f
2 files changed
+6
-3
No files matched your search
@@ -456,12 +456,13 @@ fun MenuItem(
|
||||
.padding(horizontal = 10.dp, vertical = 9.dp),
|
||||
) {
|
||||
Text("✓", fontSize = 12.sp, color = pal.signal, modifier = Modifier.width(18.dp).alpha(if (checked) 1f else 0f).clearAndSetSemantics {})
|
||||
val ink = if (checked) pal.signal else colors.onBackground
|
||||
if (leading != null) {
|
||||
leading()
|
||||
androidx.compose.runtime.CompositionLocalProvider(androidx.compose.material3.LocalContentColor provides ink) { leading() }
|
||||
Spacer(Modifier.width(8.dp))
|
||||
}
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(label, fontSize = 13.5.sp, color = if (checked) pal.signal else colors.onBackground, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
||||
Text(label, fontSize = 13.5.sp, color = ink, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
||||
if (detail != null) Text(detail, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
if (trailing != null) { Spacer(Modifier.width(8.dp)); trailing() }
|
||||
|
||||
@@ -88,7 +88,9 @@ internal fun TabMenu(
|
||||
.controllerConfirm(onClick = toggle)
|
||||
.padding(start = 14.dp, end = 10.dp),
|
||||
) {
|
||||
if (selected in labels.indices) leading?.invoke(selected, false)
|
||||
if (selected in labels.indices) androidx.compose.runtime.CompositionLocalProvider(androidx.compose.material3.LocalContentColor provides colors.onBackground) {
|
||||
leading?.invoke(selected, false)
|
||||
}
|
||||
Text(label, fontSize = 14.sp, fontWeight = FontWeight.Bold, color = colors.onBackground, maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false))
|
||||
Icon(if (open) Icons.Outlined.ExpandLess else Icons.Outlined.ExpandMore, contentDescription = null,
|
||||
|
||||
Reference in new issue
Block a user