mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-14 14:45:33 +00:00
chat theme: Set default uses SCHOOL preset's recalibrated colors
ThemeModeOverride.withFilledAppDefaults — backing the "Set default theme" button in Chat info > Chat theme — set the wallpaper to the SCHOOL preset but passed null for presetWallpaperTheme when filling colors. The five-source priority chain therefore fell through to LightColorPalette / DarkColorPalette / SimplexColorPalette / BlackColorPalette: the base palette colors that predate this PR's preset recalibration. Result: a chat reset via "Set default theme" showed the SCHOOL pattern on top of pre-recalibration bubble colors that no longer match it. Pass preset.colors[base] so the priority chain picks up SCHOOL's tuned colors for the chosen mode, matching what the wallpaper expects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+10
-4
@@ -661,12 +661,18 @@ data class ThemeModeOverride (
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun withFilledAppDefaults(mode: DefaultThemeMode, base: DefaultTheme): ThemeModeOverride =
|
||||
ThemeModeOverride(
|
||||
fun withFilledAppDefaults(mode: DefaultThemeMode, base: DefaultTheme): ThemeModeOverride {
|
||||
// Default override = SCHOOL preset image + SCHOOL's recalibrated colors
|
||||
// for this base. Without passing preset.colors[base], the color chain
|
||||
// falls through to LightColorPalette / DarkColorPalette / etc. — the
|
||||
// pre-PR values that no longer match the recalibrated SCHOOL wallpaper.
|
||||
val preset = PresetWallpaper.SCHOOL
|
||||
return ThemeModeOverride(
|
||||
mode = mode,
|
||||
colors = ThemeOverrides(base = base).withFilledColors(base, null, null, null, null, null),
|
||||
wallpaper = ThemeWallpaper(preset = PresetWallpaper.SCHOOL.filename)
|
||||
colors = ThemeOverrides(base = base).withFilledColors(base, null, null, null, null, preset.colors[base]),
|
||||
wallpaper = ThemeWallpaper(preset = preset.filename)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user