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