fix colors in high contrast theme

This commit is contained in:
MM20
2025-11-30 14:40:06 +01:00
parent 7566170e0b
commit c12c35164a
3 changed files with 6 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import android.content.pm.PackageManager
import android.graphics.drawable.Drawable
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.LocalContentColor
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
@@ -39,7 +39,7 @@ fun SearchActionIcon(
size: Dp = 20.dp
) {
val tint = when (color) {
0 -> MaterialTheme.colorScheme.primary
0 -> LocalContentColor.current
1 -> Color.Unspecified
else -> Color(color)
}

View File

@@ -50,6 +50,9 @@ fun ColumnScope.SearchBarActions(
colors = if (it == highlightedAction) {
AssistChipDefaults.assistChipColors(
containerColor = MaterialTheme.colorScheme.secondaryContainer,
labelColor = MaterialTheme.colorScheme.onSecondaryContainer,
leadingIconContentColor = MaterialTheme.colorScheme.onSecondaryContainer,
trailingIconContentColor = MaterialTheme.colorScheme.onSecondaryContainer,
)
} else AssistChipDefaults.assistChipColors(),
border = if (it == highlightedAction) {

View File

@@ -59,7 +59,7 @@ fun UnitConverterHelpSettingsScreen() {
.background(MaterialTheme.colorScheme.secondaryContainer, MaterialTheme.shapes.extraSmall),
contentAlignment = Alignment.Center,
) {
Text(unit.symbol, style = MaterialTheme.typography.labelSmall)
Text(unit.symbol, style = MaterialTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSecondaryContainer)
}
},
)