fix(theme): disable dynamic colors by default to preserve curated preset aesthetics (#1054)

This commit is contained in:
M57 authored and GitHub committed 2026-09-03 20:32:55 +03:00
1 parent 8c2d4216a7
commit 50773945f9
6 files changed
+7 -7

No files matched your search

@@ -55,7 +55,7 @@ class ServerStoreMigration(
runCatching { ThemePreference.valueOf(themePrefString!!) }
.getOrDefault(ThemePreference.SYSTEM)
val useDynamicColors = prefs.getBoolean("use_dynamic_colors", true)
val useDynamicColors = prefs.getBoolean("use_dynamic_colors", false)
val themePresetString = prefs.getString("theme_preset", ThemePreset.DEFAULT.name)
val themePreset =
@@ -13,7 +13,7 @@ data class ServerStoreState(
val baseUrl: String? = null,
val autoReconnect: Boolean = true,
val themePreference: ThemePreference = ThemePreference.SYSTEM,
val useDynamicColors: Boolean = true,
val useDynamicColors: Boolean = false,
val themePreset: ThemePreset = ThemePreset.DEFAULT,
val connectionProfiles: List<ConnectionProfile> = emptyList(),
val selectedProfileId: String? = null,
@@ -68,7 +68,7 @@ object AuthManager {
private val _themePreferenceFlow = MutableStateFlow<ThemePreference>(ThemePreference.SYSTEM)
val themePreferenceFlow: StateFlow<ThemePreference> = _themePreferenceFlow.asStateFlow()
private val _useDynamicColorsFlow = MutableStateFlow<Boolean>(true)
private val _useDynamicColorsFlow = MutableStateFlow<Boolean>(false)
val useDynamicColorsFlow: StateFlow<Boolean> = _useDynamicColorsFlow.asStateFlow()
private val _themePresetFlow = MutableStateFlow<ThemePreset>(ThemePreset.DEFAULT)
@@ -95,8 +95,8 @@ private fun themeFor(preset: ThemePreset): ThemePalette = when (preset) {
}
```
Dynamic (Material You) color on API 31+ overrides the preset scheme when
`useDynamicColors = true`. Semantic status colors are always resolved from the
Dynamic (Material You) color on API 31+ can optionally override the preset scheme when
`useDynamicColors = true` (defaults to `false`). Semantic status colors are always resolved from the
active preset via `LocalHermesStatusColors`.
## Adding a new theme
@@ -74,7 +74,7 @@ internal fun resolveStatusColors(
@Composable
fun HermesControlTheme(
themePreference: ThemePreference = LocalThemePreference.current,
useDynamicColors: Boolean = true,
useDynamicColors: Boolean = false,
themePreset: ThemePreset = ThemePreset.DEFAULT,
chatFontScale: Float = LocalChatFontScale.current,
content: @Composable () -> Unit,
@@ -29,7 +29,7 @@ data class SettingsUiState(
val token: String = "",
val autoReconnect: Boolean = true,
val themePreference: ThemePreference = ThemePreference.SYSTEM,
val useDynamicColors: Boolean = true,
val useDynamicColors: Boolean = false,
val themePreset: ThemePreset = ThemePreset.DEFAULT,
val isTesting: Boolean = false,
val testResult: String? = null,