mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Text and icon color fixes
This commit is contained in:
parent
a692b46e7a
commit
533c94db6b
@ -105,7 +105,7 @@ fun KeyboardButtonFilled(
|
||||
onLongClick = onLongClick,
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
icon = icon,
|
||||
iconColor = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||
iconColor = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||
allowVibration = allowVibration,
|
||||
)
|
||||
}
|
||||
|
@ -61,6 +61,8 @@ internal fun BasicUnitListItem(
|
||||
onClick: () -> Unit,
|
||||
favoriteUnit: () -> Unit,
|
||||
) {
|
||||
val itemColor = if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurfaceVariant
|
||||
|
||||
Box(
|
||||
modifier = modifier
|
||||
.background(MaterialTheme.colorScheme.surface)
|
||||
@ -90,7 +92,8 @@ internal fun BasicUnitListItem(
|
||||
.fillMaxWidth(),
|
||||
text = name,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = itemColor,
|
||||
)
|
||||
Text(
|
||||
modifier = Modifier
|
||||
@ -99,7 +102,7 @@ internal fun BasicUnitListItem(
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
color = itemColor
|
||||
)
|
||||
}
|
||||
AnimatedContent(
|
||||
@ -116,8 +119,9 @@ internal fun BasicUnitListItem(
|
||||
label = "Favorite unit"
|
||||
) {
|
||||
Icon(
|
||||
if (it) Icons.Filled.Favorite else Icons.Filled.FavoriteBorder,
|
||||
contentDescription = stringResource(R.string.favorite_button_description)
|
||||
imageVector = if (it) Icons.Filled.Favorite else Icons.Filled.FavoriteBorder,
|
||||
contentDescription = stringResource(R.string.favorite_button_description),
|
||||
tint = itemColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -106,14 +106,15 @@ internal fun ChipsRow(
|
||||
Icon(
|
||||
modifier = Modifier.height(18.dp),
|
||||
imageVector = Icons.Default.Check,
|
||||
contentDescription = stringResource(R.string.checked_filter_description)
|
||||
contentDescription = stringResource(R.string.checked_filter_description),
|
||||
tint = MaterialTheme.colorScheme.onPrimaryContainer
|
||||
)
|
||||
}
|
||||
Text(
|
||||
modifier = Modifier.padding(start = 8.dp),
|
||||
text = stringResource(item.res),
|
||||
style = MaterialTheme.typography.labelLarge,
|
||||
color = if (isSelected) MaterialTheme.colorScheme.onSecondaryContainer else MaterialTheme.colorScheme.onSurfaceVariant
|
||||
color = if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -183,14 +184,15 @@ fun ChipsFlexRow(
|
||||
Icon(
|
||||
modifier = Modifier.height(18.dp),
|
||||
imageVector = Icons.Default.Check,
|
||||
contentDescription = stringResource(R.string.checked_filter_description)
|
||||
contentDescription = stringResource(R.string.checked_filter_description),
|
||||
tint = MaterialTheme.colorScheme.onPrimaryContainer
|
||||
)
|
||||
}
|
||||
Text(
|
||||
modifier = Modifier.padding(start = 8.dp),
|
||||
text = stringResource(item.res),
|
||||
style = MaterialTheme.typography.labelLarge,
|
||||
color = if (isSelected) MaterialTheme.colorScheme.onSecondaryContainer else MaterialTheme.colorScheme.onSurfaceVariant
|
||||
color = if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ internal fun UnitSelectionButton(
|
||||
text = it,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = MaterialTheme.colorScheme.onSecondaryContainer
|
||||
color = MaterialTheme.colorScheme.onPrimaryContainer
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user