diff --git a/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/KeyboardButton.kt b/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/KeyboardButton.kt index c51763c9..55eb2dfc 100644 --- a/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/KeyboardButton.kt +++ b/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/KeyboardButton.kt @@ -105,7 +105,7 @@ fun KeyboardButtonFilled( onLongClick = onLongClick, containerColor = MaterialTheme.colorScheme.primaryContainer, icon = icon, - iconColor = MaterialTheme.colorScheme.onSecondaryContainer, + iconColor = MaterialTheme.colorScheme.onPrimaryContainer, allowVibration = allowVibration, ) } diff --git a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/BasicUnitListItem.kt b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/BasicUnitListItem.kt index 8ed31494..67c855cd 100644 --- a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/BasicUnitListItem.kt +++ b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/BasicUnitListItem.kt @@ -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 ) } } diff --git a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/ChipsRow.kt b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/ChipsRow.kt index 2d16f8f5..2057cdd5 100644 --- a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/ChipsRow.kt +++ b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/ChipsRow.kt @@ -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 ) } } diff --git a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt index 9901b0b9..8d9a31eb 100644 --- a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt +++ b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt @@ -77,7 +77,7 @@ internal fun UnitSelectionButton( text = it, maxLines = 1, overflow = TextOverflow.Ellipsis, - color = MaterialTheme.colorScheme.onSecondaryContainer + color = MaterialTheme.colorScheme.onPrimaryContainer ) } }