From 143653005decba1ba995f27c4792176c67901462 Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Wed, 13 May 2026 14:11:02 -0700 Subject: [PATCH] chat theme: Set default uses SCHOOL preset's recalibrated colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../kotlin/chat/simplex/common/ui/theme/Theme.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt index 5d4cf64708..adb97d9ca8 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt @@ -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) ) + } } }