[ANDROID] Fix #376

This commit is contained in:
Kamil Gurgul
2026-03-11 06:49:43 +01:00
parent a44e9a847f
commit 9c844ac9ca
5 changed files with 23 additions and 13 deletions
@@ -84,16 +84,20 @@ class HostActivity : ComponentActivity() {
dynamicColor && darkTheme -> {
val dynamicDarkColors = dynamicDarkColorScheme(LocalContext.current)
DarkColors.copy(
secondary = dynamicDarkColors.surfaceContainerHighest,
onSecondary = dynamicDarkColors.onSurface,
secondary = dynamicDarkColors.secondaryFixed,
onSecondary = dynamicDarkColors.onSecondaryFixed,
tertiaryFixed = dynamicDarkColors.tertiaryFixed,
onTertiaryFixed = dynamicDarkColors.onTertiaryFixed,
)
}
dynamicColor && !darkTheme -> {
val dynamicLightColors = dynamicLightColorScheme(LocalContext.current)
LightColors.copy(
secondary = dynamicLightColors.surfaceContainerHighest,
onSecondary = dynamicLightColors.onSurface,
secondary = dynamicLightColors.secondaryFixed,
onSecondary = dynamicLightColors.onSecondaryFixed,
tertiaryFixed = dynamicLightColors.tertiaryFixed,
onTertiaryFixed = dynamicLightColors.onTertiaryFixed,
)
}
@@ -220,7 +220,7 @@ private fun SettingsList(
Text(
text = stringResource(Res.string.general),
style = MaterialTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.tertiary,
color = MaterialTheme.colorScheme.tertiaryFixed,
)
Spacer(modifier = Modifier.requiredSize(spacingMedium))
}
@@ -243,7 +243,7 @@ private fun SettingsList(
Text(
text = stringResource(Res.string.settings_others),
style = MaterialTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.tertiary,
color = MaterialTheme.colorScheme.tertiaryFixed,
)
Spacer(modifier = Modifier.requiredSize(spacingMedium))
}
@@ -347,7 +347,7 @@ private fun TemperatureUnitDialog(
onClick = null,
colors =
RadioButtonDefaults.colors(
selectedColor = MaterialTheme.colorScheme.tertiary
selectedColor = MaterialTheme.colorScheme.tertiaryFixed
),
)
Text(
@@ -405,7 +405,7 @@ private fun ThemeDialog(
onClick = null,
colors =
RadioButtonDefaults.colors(
selectedColor = MaterialTheme.colorScheme.tertiary
selectedColor = MaterialTheme.colorScheme.tertiaryFixed
),
)
Text(
@@ -60,7 +60,8 @@ fun CpuProgressBar(
minMaxValues: Pair<String, String>? = null,
prefixImageRes: DrawableResource? = null,
textColor: Color = MaterialTheme.colorScheme.onBackground,
progressColor: Color = MaterialTheme.colorScheme.tertiary,
progressColor: Color = MaterialTheme.colorScheme.tertiaryFixed,
backgroundColor: Color = MaterialTheme.colorScheme.surfaceVariant,
progressHeight: Dp = 16.dp,
titleTextStyle: TextStyle = MaterialTheme.typography.titleSmall,
) {
@@ -69,10 +70,7 @@ fun CpuProgressBar(
Spacer(modifier = Modifier.requiredSize(spacingSmall))
Box(
modifier =
Modifier.background(
color = MaterialTheme.colorScheme.surfaceVariant,
shape = MaterialTheme.shapes.small,
)
Modifier.background(color = backgroundColor, shape = MaterialTheme.shapes.small)
.padding(spacingXSmall)
) {
var currentProgress by rememberSaveable { mutableFloatStateOf(0f) }
@@ -29,6 +29,8 @@ val md_theme_light_tertiary = Color(0xFFD84315)
val md_theme_light_onTertiary = Color(0xFFFFFFFF)
val md_theme_light_tertiaryContainer = Color(0xFFFFDAD6)
val md_theme_light_onTertiaryContainer = Color(0xFF410003)
val md_theme_light_tertiaryFixed = Color(0xFFD84315)
val md_theme_light_onTertiaryFixed = Color(0xFFDBE4E6)
val md_theme_light_error = Color(0xFFBA1A1A)
val md_theme_light_errorContainer = Color(0xFFFFDAD6)
val md_theme_light_onError = Color(0xFFFFFFFF)
@@ -67,6 +69,8 @@ val md_theme_dark_tertiary = Color(0xFFD32F2F)
val md_theme_dark_onTertiary = Color(0xFF680008)
val md_theme_dark_tertiaryContainer = Color(0xFF930010)
val md_theme_dark_onTertiaryContainer = Color(0xFFFFDAD6)
val md_theme_dark_tertiaryFixed = Color(0xFFD32F2F)
val md_theme_dark_onTertiaryFixed = Color(0xFFE4E5E7)
val md_theme_dark_error = Color(0xFFFFB4AB)
val md_theme_dark_errorContainer = Color(0xFF93000A)
val md_theme_dark_onError = Color(0xFF690005)
@@ -40,6 +40,8 @@ val LightColors =
onTertiary = md_theme_light_onTertiary,
tertiaryContainer = md_theme_light_tertiaryContainer,
onTertiaryContainer = md_theme_light_onTertiaryContainer,
tertiaryFixed = md_theme_light_tertiaryFixed,
onTertiaryFixed = md_theme_light_onTertiaryFixed,
error = md_theme_light_error,
errorContainer = md_theme_light_errorContainer,
onError = md_theme_light_onError,
@@ -80,6 +82,8 @@ val DarkColors =
onTertiary = md_theme_dark_onTertiary,
tertiaryContainer = md_theme_dark_tertiaryContainer,
onTertiaryContainer = md_theme_dark_onTertiaryContainer,
tertiaryFixed = md_theme_dark_tertiaryFixed,
onTertiaryFixed = md_theme_dark_onTertiaryFixed,
error = md_theme_dark_error,
errorContainer = md_theme_dark_errorContainer,
onError = md_theme_dark_onError,