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;
|
/** UI theme: Sonar (the Android companion's palette) is the default;
|
||||||
* Meridian and Light are opt-in and persisted. */
|
* 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()
|
val themeMode: StateFlow<ThemeMode> = _themeMode.asStateFlow()
|
||||||
fun setThemeMode(mode: ThemeMode) {
|
fun setThemeMode(mode: ThemeMode) {
|
||||||
_themeMode.value = mode
|
_themeMode.value = mode
|
||||||
|
|
@ -161,7 +161,7 @@ class DesktopState(private val appDir: File = defaultAppDir()) {
|
||||||
prefs.putString(KEY_THEME, when (mode) {
|
prefs.putString(KEY_THEME, when (mode) {
|
||||||
ThemeMode.LIGHT -> "light"
|
ThemeMode.LIGHT -> "light"
|
||||||
ThemeMode.MERIDIAN -> "meridian"
|
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
|
// pick Meridian explicitly to get the old look back
|
||||||
"light" -> ThemeMode.LIGHT
|
"light" -> ThemeMode.LIGHT
|
||||||
"meridian" -> ThemeMode.MERIDIAN
|
"meridian" -> ThemeMode.MERIDIAN
|
||||||
else -> ThemeMode.SONAR
|
else -> ThemeMode.DEFAULT
|
||||||
}
|
}
|
||||||
loadNotifyState()
|
loadNotifyState()
|
||||||
prefs.getString(KEY_FOLDER)?.let { File(it).takeIf { it.isDirectory } }
|
prefs.getString(KEY_FOLDER)?.let { File(it).takeIf { it.isDirectory } }
|
||||||
|
|
|
||||||
|
|
@ -1329,9 +1329,9 @@ fun SettingsScreen(state: DesktopState) {
|
||||||
Row(horizontalArrangement = Arrangement.spacedBy(Shonar.Space2),
|
Row(horizontalArrangement = Arrangement.spacedBy(Shonar.Space2),
|
||||||
verticalAlignment = Alignment.CenterVertically) {
|
verticalAlignment = Alignment.CenterVertically) {
|
||||||
val mode = state.themeMode.collectAsState().value
|
val mode = state.themeMode.collectAsState().value
|
||||||
PillChip(selected = mode == ThemeMode.SONAR,
|
PillChip(selected = mode == ThemeMode.DEFAULT,
|
||||||
onClick = { state.setThemeMode(ThemeMode.SONAR) },
|
onClick = { state.setThemeMode(ThemeMode.DEFAULT) },
|
||||||
label = "Sonar")
|
label = "Default")
|
||||||
PillChip(selected = mode == ThemeMode.MERIDIAN,
|
PillChip(selected = mode == ThemeMode.MERIDIAN,
|
||||||
onClick = { state.setThemeMode(ThemeMode.MERIDIAN) },
|
onClick = { state.setThemeMode(ThemeMode.MERIDIAN) },
|
||||||
label = "Meridian")
|
label = "Meridian")
|
||||||
|
|
@ -1339,10 +1339,10 @@ fun SettingsScreen(state: DesktopState) {
|
||||||
onClick = { state.setThemeMode(ThemeMode.LIGHT) },
|
onClick = { state.setThemeMode(ThemeMode.LIGHT) },
|
||||||
label = "Light")
|
label = "Light")
|
||||||
}
|
}
|
||||||
HelperText("Sonar is the Android companion app's palette (navy + " +
|
HelperText("Default is the Android companion app's palette (navy + " +
|
||||||
"coral) — the default, so desktop and phone read as one " +
|
"teal) — so desktop and phone read as one product. Meridian " +
|
||||||
"product. Meridian is the charcoal/blue look; Light mirrors " +
|
"is the charcoal/blue look; Light mirrors the same hierarchy " +
|
||||||
"the same hierarchy on paper tones. Applied instantly.")
|
"on paper tones. Applied instantly.")
|
||||||
SectionHeader("Recordings folder")
|
SectionHeader("Recordings folder")
|
||||||
Row(verticalAlignment = Alignment.CenterVertically,
|
Row(verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(Shonar.Space2)) {
|
horizontalArrangement = Arrangement.spacedBy(Shonar.Space2)) {
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,12 @@ private val SonarPalette = ShonarPalette(
|
||||||
highlightTint = Color(0xFF0B2E26), // deep teal row wash on navy
|
highlightTint = Color(0xFF0B2E26), // deep teal row wash on navy
|
||||||
)
|
)
|
||||||
|
|
||||||
/** Which palette the app renders in. Persisted as "sonar" / "meridian"
|
/** Which palette the app renders in. Persisted as "default" /
|
||||||
* / "light" (legacy "dark" loads as SONAR). SONAR mirrors the Android
|
* "meridian" / "light" (legacy "dark"/"sonar" load as DEFAULT).
|
||||||
* companion app's palette so the two read as one product; MERIDIAN is
|
* DEFAULT mirrors the Android companion app's palette so the two read
|
||||||
* the charcoal/blue look from the Sep design pass, kept optional. */
|
* as one product; MERIDIAN is the charcoal/blue look from the Sep
|
||||||
enum class ThemeMode { SONAR, MERIDIAN, LIGHT }
|
* design pass, kept optional. */
|
||||||
|
enum class ThemeMode { DEFAULT, MERIDIAN, LIGHT }
|
||||||
|
|
||||||
object Shonar {
|
object Shonar {
|
||||||
// ---- palette routing ----
|
// ---- palette routing ----
|
||||||
|
|
@ -370,13 +371,13 @@ private val ShonarLightScheme = lightColorScheme(
|
||||||
* (dark is the signature default). */
|
* (dark is the signature default). */
|
||||||
@Composable
|
@Composable
|
||||||
fun ShonarTheme(
|
fun ShonarTheme(
|
||||||
mode: ThemeMode = ThemeMode.SONAR,
|
mode: ThemeMode = ThemeMode.DEFAULT,
|
||||||
content: @Composable () -> Unit,
|
content: @Composable () -> Unit,
|
||||||
) {
|
) {
|
||||||
val palette = when (mode) {
|
val palette = when (mode) {
|
||||||
ThemeMode.LIGHT -> LightPalette
|
ThemeMode.LIGHT -> LightPalette
|
||||||
ThemeMode.MERIDIAN -> DarkPalette
|
ThemeMode.MERIDIAN -> DarkPalette
|
||||||
ThemeMode.SONAR -> SonarPalette
|
ThemeMode.DEFAULT -> SonarPalette
|
||||||
}
|
}
|
||||||
// Every typography tier carries explicit per-palette ink: a TextStyle
|
// Every typography tier carries explicit per-palette ink: a TextStyle
|
||||||
// with no color falls back to Compose's default BLACK, which is
|
// with no color falls back to Compose's default BLACK, which is
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue