From a4cd4469266cb7b17a2401a7104bef6c44ee3f10 Mon Sep 17 00:00:00 2001 From: avi Date: Mon, 21 Sep 2026 19:52:36 -0500 Subject: [PATCH] =?UTF-8?q?Theme=20rename:=20'Sonar'=20is=20now=20'Default?= =?UTF-8?q?'=20(user=20directive)=20=E2=80=94=20Settings=20pill=20label,?= =?UTF-8?q?=20enum,=20and=20pref=20key=20'default';=20legacy=20'dark'/'son?= =?UTF-8?q?ar'=20prefs=20load=20as=20Default;=20helper=20text=20fixed=20to?= =?UTF-8?q?=20teal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/shonar/desktop/DesktopState.kt | 6 +++--- app/src/main/kotlin/com/shonar/desktop/Screens.kt | 14 +++++++------- app/src/main/kotlin/com/shonar/desktop/Theme.kt | 15 ++++++++------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt b/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt index 5361cef..69eaa47 100644 --- a/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt +++ b/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt @@ -153,7 +153,7 @@ class DesktopState(private val appDir: File = defaultAppDir()) { /** UI theme: Sonar (the Android companion's palette) is the default; * Meridian and Light are opt-in and persisted. */ - private val _themeMode = MutableStateFlow(ThemeMode.SONAR) + private val _themeMode = MutableStateFlow(ThemeMode.DEFAULT) val themeMode: StateFlow = _themeMode.asStateFlow() fun setThemeMode(mode: ThemeMode) { _themeMode.value = mode @@ -161,7 +161,7 @@ class DesktopState(private val appDir: File = defaultAppDir()) { prefs.putString(KEY_THEME, when (mode) { ThemeMode.LIGHT -> "light" ThemeMode.MERIDIAN -> "meridian" - ThemeMode.SONAR -> "sonar" + ThemeMode.DEFAULT -> "default" }) } } @@ -200,7 +200,7 @@ class DesktopState(private val appDir: File = defaultAppDir()) { // pick Meridian explicitly to get the old look back "light" -> ThemeMode.LIGHT "meridian" -> ThemeMode.MERIDIAN - else -> ThemeMode.SONAR + else -> ThemeMode.DEFAULT } loadNotifyState() prefs.getString(KEY_FOLDER)?.let { File(it).takeIf { it.isDirectory } } diff --git a/app/src/main/kotlin/com/shonar/desktop/Screens.kt b/app/src/main/kotlin/com/shonar/desktop/Screens.kt index 691b3c4..5a3ce59 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Screens.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Screens.kt @@ -1329,9 +1329,9 @@ fun SettingsScreen(state: DesktopState) { Row(horizontalArrangement = Arrangement.spacedBy(Shonar.Space2), verticalAlignment = Alignment.CenterVertically) { val mode = state.themeMode.collectAsState().value - PillChip(selected = mode == ThemeMode.SONAR, - onClick = { state.setThemeMode(ThemeMode.SONAR) }, - label = "Sonar") + PillChip(selected = mode == ThemeMode.DEFAULT, + onClick = { state.setThemeMode(ThemeMode.DEFAULT) }, + label = "Default") PillChip(selected = mode == ThemeMode.MERIDIAN, onClick = { state.setThemeMode(ThemeMode.MERIDIAN) }, label = "Meridian") @@ -1339,10 +1339,10 @@ fun SettingsScreen(state: DesktopState) { onClick = { state.setThemeMode(ThemeMode.LIGHT) }, label = "Light") } - HelperText("Sonar is the Android companion app's palette (navy + " + - "coral) — the default, so desktop and phone read as one " + - "product. Meridian is the charcoal/blue look; Light mirrors " + - "the same hierarchy on paper tones. Applied instantly.") + HelperText("Default is the Android companion app's palette (navy + " + + "teal) — so desktop and phone read as one product. Meridian " + + "is the charcoal/blue look; Light mirrors the same hierarchy " + + "on paper tones. Applied instantly.") SectionHeader("Recordings folder") Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(Shonar.Space2)) { diff --git a/app/src/main/kotlin/com/shonar/desktop/Theme.kt b/app/src/main/kotlin/com/shonar/desktop/Theme.kt index 20f6d1f..60a5f0d 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Theme.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Theme.kt @@ -158,11 +158,12 @@ private val SonarPalette = ShonarPalette( highlightTint = Color(0xFF0B2E26), // deep teal row wash on navy ) -/** Which palette the app renders in. Persisted as "sonar" / "meridian" - * / "light" (legacy "dark" loads as SONAR). SONAR mirrors the Android - * companion app's palette so the two read as one product; MERIDIAN is - * the charcoal/blue look from the Sep design pass, kept optional. */ -enum class ThemeMode { SONAR, MERIDIAN, LIGHT } +/** Which palette the app renders in. Persisted as "default" / + * "meridian" / "light" (legacy "dark"/"sonar" load as DEFAULT). + * DEFAULT mirrors the Android companion app's palette so the two read + * as one product; MERIDIAN is the charcoal/blue look from the Sep + * design pass, kept optional. */ +enum class ThemeMode { DEFAULT, MERIDIAN, LIGHT } object Shonar { // ---- palette routing ---- @@ -370,13 +371,13 @@ private val ShonarLightScheme = lightColorScheme( * (dark is the signature default). */ @Composable fun ShonarTheme( - mode: ThemeMode = ThemeMode.SONAR, + mode: ThemeMode = ThemeMode.DEFAULT, content: @Composable () -> Unit, ) { val palette = when (mode) { ThemeMode.LIGHT -> LightPalette ThemeMode.MERIDIAN -> DarkPalette - ThemeMode.SONAR -> SonarPalette + ThemeMode.DEFAULT -> SonarPalette } // Every typography tier carries explicit per-palette ink: a TextStyle // with no color falls back to Compose's default BLACK, which is