diff --git a/Manager/app/src/main/assets/patches-manifest.json b/Manager/app/src/main/assets/patches-manifest.json
index c6f2076..d9ebef9 100644
--- a/Manager/app/src/main/assets/patches-manifest.json
+++ b/Manager/app/src/main/assets/patches-manifest.json
@@ -534,16 +534,14 @@
"type": "color",
"key": "background_color",
"title": "Add to Queue Color",
- "default": -14748953,
- "defaultLabel": "Cyan",
+ "default": -14408663,
"token": "RL_SWIPE_TO_QUEUE_ADD_COLOR"
},
{
"type": "color",
"key": "play_next_color",
"title": "Play Next Color",
- "default": -14749031,
- "defaultLabel": "Green",
+ "default": -14408663,
"token": "RL_SWIPE_TO_QUEUE_PLAY_NEXT_COLOR"
}
]
diff --git a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/legacy/screens/patchopts/components/PatchAdvancedOptionsSheet.kt b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/legacy/screens/patchopts/components/PatchAdvancedOptionsSheet.kt
index 58df3bc..93a348c 100644
--- a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/legacy/screens/patchopts/components/PatchAdvancedOptionsSheet.kt
+++ b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/legacy/screens/patchopts/components/PatchAdvancedOptionsSheet.kt
@@ -223,7 +223,6 @@ fun PatchAdvancedOptionsSheet(
title = option.title,
color = state.color(patch, option),
defaultColor = option.default,
- manifestDefaultLabel = option.defaultLabel,
onColorChange = { state.setColor(patch, option, it) },
)
}
@@ -472,22 +471,33 @@ private fun ColorOptionRow(
title: String,
color: Int,
defaultColor: Int,
- manifestDefaultLabel: String?,
onColorChange: (Int) -> Unit,
) {
var showPicker by rememberSaveable { mutableStateOf(false) }
val selectedColor = color.withOpaqueAlpha()
- val materialYouColor = MaterialTheme.colorScheme.primary.toArgb().withOpaqueAlpha()
- val opaqueDefault = defaultColor.withOpaqueAlpha()
- val defaultLabel = manifestDefaultLabel ?: if (opaqueDefault == TIDAL_GREEN) {
- stringResource(R.string.patch_color_green)
- } else stringResource(R.string.patch_waze_color_waze_default)
- val presets = listOf(
- defaultLabel,
- stringResource(R.string.patch_waze_color_tidal_cyan),
- stringResource(R.string.patch_waze_color_material_you),
- )
- val presetColors = listOf(opaqueDefault, TIDAL_CYAN, materialYouColor)
+ val isNeutralPalette = defaultColor.withOpaqueAlpha() == NEUTRAL
+ val presets = if (isNeutralPalette) {
+ listOf(
+ stringResource(R.string.patch_color_neutral),
+ stringResource(R.string.patch_color_green),
+ stringResource(R.string.patch_color_cyan),
+ )
+ } else {
+ listOf(
+ stringResource(R.string.patch_waze_color_waze_default),
+ stringResource(R.string.patch_waze_color_tidal_cyan),
+ stringResource(R.string.patch_waze_color_material_you),
+ )
+ }
+ val presetColors = if (isNeutralPalette) {
+ listOf(NEUTRAL, GREEN, CYAN)
+ } else {
+ listOf(
+ defaultColor.withOpaqueAlpha(),
+ TIDAL_CYAN,
+ MaterialTheme.colorScheme.primary.toArgb().withOpaqueAlpha(),
+ )
+ }
val selectedPreset = presetColors.indexOf(selectedColor)
Column(
@@ -515,6 +525,12 @@ private fun ColorOptionRow(
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary,
)
+ Icon(
+ painter = painterResource(R.drawable.ic_edit),
+ contentDescription = stringResource(R.string.patch_color_edit),
+ tint = MaterialTheme.colorScheme.primary,
+ modifier = Modifier.size(18.dp),
+ )
}
SingleChoiceSegmentedButtonRow(modifier = Modifier.fillMaxWidth()) {
presets.forEachIndexed { index, label ->
@@ -650,7 +666,9 @@ private fun formatSliderValue(option: OptionSpec.Slider, value: Float): String {
}
private const val OPAQUE_ALPHA = -0x1000000
-private const val TIDAL_GREEN = -14749031 // #ff1ef299
+private const val NEUTRAL = -14408663 // #ff242429
+private const val GREEN = -14749031 // #ff1ef299
+private const val CYAN = -14748953 // #ff1ef2e7
private const val TIDAL_CYAN = -14549268 // #ff21feec
private fun Int.withOpaqueAlpha(): Int = (this and 0x00FFFFFF) or OPAQUE_ALPHA
diff --git a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/PatchSpec.kt b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/PatchSpec.kt
index 806030e..879327e 100644
--- a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/PatchSpec.kt
+++ b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/PatchSpec.kt
@@ -138,7 +138,6 @@ sealed interface OptionSpec {
override val title: String = "",
override val description: String = "",
val default: Int = 0,
- val defaultLabel: String? = null,
/** Placeholder name (without the surrounding `__`) baked into the `.patch`/extension files. */
val token: String? = null,
) : OptionSpec
diff --git a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/components/PatchAdvancedOptionsSheet.kt b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/components/PatchAdvancedOptionsSheet.kt
index 2778e83..cb5f7b0 100644
--- a/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/components/PatchAdvancedOptionsSheet.kt
+++ b/Manager/app/src/main/kotlin/com/meowarex/rlmobile/ui/screens/patchopts/components/PatchAdvancedOptionsSheet.kt
@@ -230,7 +230,6 @@ fun PatchAdvancedOptionsSheet(
title = option.title,
color = state.color(patch, option),
defaultColor = option.default,
- manifestDefaultLabel = option.defaultLabel,
onColorChange = { state.setColor(patch, option, it) },
)
}
@@ -455,22 +454,33 @@ private fun ColorOptionRow(
title: String,
color: Int,
defaultColor: Int,
- manifestDefaultLabel: String?,
onColorChange: (Int) -> Unit,
) {
var showPicker by rememberSaveable { mutableStateOf(false) }
val selectedColor = color.withOpaqueAlpha()
- val materialYouColor = MaterialTheme.colorScheme.primary.toArgb().withOpaqueAlpha()
- val opaqueDefault = defaultColor.withOpaqueAlpha()
- val defaultLabel = manifestDefaultLabel ?: if (opaqueDefault == TIDAL_GREEN) {
- stringResource(R.string.patch_color_green)
- } else stringResource(R.string.patch_waze_color_waze_default)
- val presets = listOf(
- defaultLabel,
- stringResource(R.string.patch_waze_color_tidal_cyan),
- stringResource(R.string.patch_waze_color_material_you),
- )
- val presetColors = listOf(opaqueDefault, TIDAL_CYAN, materialYouColor)
+ val isNeutralPalette = defaultColor.withOpaqueAlpha() == NEUTRAL
+ val presets = if (isNeutralPalette) {
+ listOf(
+ stringResource(R.string.patch_color_neutral),
+ stringResource(R.string.patch_color_green),
+ stringResource(R.string.patch_color_cyan),
+ )
+ } else {
+ listOf(
+ stringResource(R.string.patch_waze_color_waze_default),
+ stringResource(R.string.patch_waze_color_tidal_cyan),
+ stringResource(R.string.patch_waze_color_material_you),
+ )
+ }
+ val presetColors = if (isNeutralPalette) {
+ listOf(NEUTRAL, GREEN, CYAN)
+ } else {
+ listOf(
+ defaultColor.withOpaqueAlpha(),
+ TIDAL_CYAN,
+ MaterialTheme.colorScheme.primary.toArgb().withOpaqueAlpha(),
+ )
+ }
val selectedPreset = presetColors.indexOf(selectedColor)
Column(
@@ -498,6 +508,12 @@ private fun ColorOptionRow(
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary,
)
+ Icon(
+ painter = painterResource(R.drawable.ic_edit),
+ contentDescription = stringResource(R.string.patch_color_edit),
+ tint = MaterialTheme.colorScheme.primary,
+ modifier = Modifier.size(18.dp),
+ )
}
RadiantSegmented(
options = presets,
@@ -611,7 +627,9 @@ private fun formatSliderValue(option: OptionSpec.Slider, value: Float): String {
}
private const val OPAQUE_ALPHA = -0x1000000
-private const val TIDAL_GREEN = -14749031 // #ff1ef299
+private const val NEUTRAL = -14408663 // #ff242429
+private const val GREEN = -14749031 // #ff1ef299
+private const val CYAN = -14748953 // #ff1ef2e7
private const val TIDAL_CYAN = -14549268 // #ff21feec
private fun Int.withOpaqueAlpha(): Int = (this and 0x00FFFFFF) or OPAQUE_ALPHA
diff --git a/Manager/app/src/main/res/drawable/ic_edit.xml b/Manager/app/src/main/res/drawable/ic_edit.xml
new file mode 100644
index 0000000..9ae2d89
--- /dev/null
+++ b/Manager/app/src/main/res/drawable/ic_edit.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/Manager/app/src/main/res/values/strings.xml b/Manager/app/src/main/res/values/strings.xml
index 1a5afa2..54aba54 100644
--- a/Manager/app/src/main/res/values/strings.xml
+++ b/Manager/app/src/main/res/values/strings.xml
@@ -305,13 +305,16 @@
Media Menu
Accent Color
Waze Default
+ Neutral
Green
+ Cyan
TIDAL Cyan
Material You
Auto Menu
Home
Recents
Custom color
+ Choose custom color
Hex color
Use #RRGGBB or #AARRGGBB.
Enable Legacy UI
diff --git a/patches/manifest.json b/patches/manifest.json
index c6f2076..d9ebef9 100644
--- a/patches/manifest.json
+++ b/patches/manifest.json
@@ -534,16 +534,14 @@
"type": "color",
"key": "background_color",
"title": "Add to Queue Color",
- "default": -14748953,
- "defaultLabel": "Cyan",
+ "default": -14408663,
"token": "RL_SWIPE_TO_QUEUE_ADD_COLOR"
},
{
"type": "color",
"key": "play_next_color",
"title": "Play Next Color",
- "default": -14749031,
- "defaultLabel": "Green",
+ "default": -14408663,
"token": "RL_SWIPE_TO_QUEUE_PLAY_NEXT_COLOR"
}
]