Theme rename: 'Sonar' is now 'Default' (user directive) — Settings pill label, enum, and pref key 'default'; legacy 'dark'/'sonar' prefs load as Default; helper text fixed to teal
This commit is contained in:
parent
13aae7818d
commit
a4cd446926
3 changed files with 18 additions and 17 deletions
|
|
@ -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> = _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 } }
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue