Skip to content

Commit 930bb29

Browse files
eriedclaude
andcommitted
Motor sound icons + 0.5.0
Section header uses Motorcycle. Engine picker shows GraphicEq for synth presets and a custom vital_signs drawable (Material Symbols glyph wrapped with translateY(960) since its viewBox is 0 -960 960 960) for sampled presets so same-named presets are distinguishable at a glance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 381d19f commit 930bb29

4 files changed

Lines changed: 57 additions & 19 deletions

File tree

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ android {
2727
applicationId = "com.eried.eucplanet"
2828
minSdk = 29
2929
targetSdk = 35
30-
versionCode = 37
31-
versionName = "0.4.5"
30+
versionCode = 38
31+
versionName = "0.5.0"
3232

3333
val buildStamp = SimpleDateFormat("yyMMdd.HHmm")
3434
.apply { timeZone = TimeZone.getTimeZone("UTC") }

app/src/main/java/com/eried/eucplanet/ui/settings/SettingsScreen.kt

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ import androidx.compose.material.icons.filled.DisplaySettings
3636
import androidx.compose.material.icons.filled.DragHandle
3737
import androidx.compose.material.icons.filled.Edit
3838
import androidx.compose.material.icons.filled.Extension
39-
import androidx.compose.material.icons.filled.Album
4039
import androidx.compose.material.icons.filled.GraphicEq
41-
import androidx.compose.material.icons.filled.Equalizer
40+
import androidx.compose.material.icons.filled.Motorcycle
4241
import androidx.compose.material.icons.filled.Watch
4342
import androidx.compose.material.icons.filled.KeyboardArrowDown
4443
import androidx.compose.material.icons.filled.KeyboardArrowUp
@@ -100,6 +99,7 @@ import androidx.compose.ui.layout.positionInWindow
10099
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
101100
import androidx.compose.ui.platform.LocalContext
102101
import androidx.compose.ui.platform.LocalHapticFeedback
102+
import androidx.compose.ui.res.painterResource
103103
import androidx.compose.ui.res.stringResource
104104
import androidx.compose.ui.text.style.TextAlign
105105
import androidx.compose.ui.text.style.TextOverflow
@@ -351,7 +351,7 @@ fun SettingsScreen(
351351
SectionDef("voice", titleVoice, Icons.Default.RecordVoiceOver, corpusVoice) {
352352
VoiceTab(settings, viewModel)
353353
},
354-
SectionDef("motor", titleMotor, Icons.Default.GraphicEq, corpusMotor) {
354+
SectionDef("motor", titleMotor, Icons.Default.Motorcycle, corpusMotor) {
355355
EngineSoundSection(settings, viewModel, engineParked)
356356
},
357357
SectionDef("cloud", titleCloud, Icons.Default.Archive, corpusCloud) {
@@ -2113,12 +2113,21 @@ private fun EngineTypePicker(
21132113
onValueChange = {},
21142114
readOnly = true,
21152115
leadingIcon = {
2116-
Icon(
2117-
imageVector = if (isSampled) Icons.Filled.Album else Icons.Filled.Equalizer,
2118-
contentDescription = sourceLabel,
2119-
modifier = Modifier.size(18.dp),
2120-
tint = MaterialTheme.colorScheme.onSurfaceVariant
2121-
)
2116+
if (isSampled) {
2117+
Icon(
2118+
painter = painterResource(R.drawable.ic_vital_signs),
2119+
contentDescription = sourceLabel,
2120+
modifier = Modifier.size(18.dp),
2121+
tint = MaterialTheme.colorScheme.onSurfaceVariant
2122+
)
2123+
} else {
2124+
Icon(
2125+
imageVector = Icons.Filled.GraphicEq,
2126+
contentDescription = sourceLabel,
2127+
modifier = Modifier.size(18.dp),
2128+
tint = MaterialTheme.colorScheme.onSurfaceVariant
2129+
)
2130+
}
21222131
},
21232132
suffix = {
21242133
Text(
@@ -2140,12 +2149,21 @@ private fun EngineTypePicker(
21402149
val itemIsSampled = p.sampleAssetBase != null
21412150
DropdownMenuItem(
21422151
leadingIcon = {
2143-
Icon(
2144-
imageVector = if (itemIsSampled) Icons.Filled.Album else Icons.Filled.Equalizer,
2145-
contentDescription = null,
2146-
modifier = Modifier.size(18.dp),
2147-
tint = MaterialTheme.colorScheme.onSurfaceVariant
2148-
)
2152+
if (itemIsSampled) {
2153+
Icon(
2154+
painter = painterResource(R.drawable.ic_vital_signs),
2155+
contentDescription = null,
2156+
modifier = Modifier.size(18.dp),
2157+
tint = MaterialTheme.colorScheme.onSurfaceVariant
2158+
)
2159+
} else {
2160+
Icon(
2161+
imageVector = Icons.Filled.GraphicEq,
2162+
contentDescription = null,
2163+
modifier = Modifier.size(18.dp),
2164+
tint = MaterialTheme.colorScheme.onSurfaceVariant
2165+
)
2166+
}
21492167
},
21502168
text = {
21512169
Row(verticalAlignment = Alignment.CenterVertically) {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Material Symbols "vital_signs" glyph, Apache 2.0.
4+
Source: https://fonts.google.com/icons?selected=Material+Symbols+Outlined:vital_signs
5+
Wrapped in a translate-960 group because Material Symbols SVGs use a
6+
viewBox of 0 -960 960 960 (origin bottom-left), while Android vector
7+
drawables anchor the viewport at (0, 0).
8+
-->
9+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
10+
android:width="24dp"
11+
android:height="24dp"
12+
android:viewportWidth="960"
13+
android:viewportHeight="960"
14+
android:tint="?attr/colorControlNormal">
15+
<group android:translateY="960">
16+
<path
17+
android:fillColor="@android:color/white"
18+
android:pathData="M326,-171q-15,-11 -22,-28l-92,-241H40v-80h228l92,244 184,-485q7,-17 22,-28t34,-11q19,0 34,11t22,28l92,241h172v80H692l-92,-244 -184,485q-7,17 -22,28t-34,11q-19,0 -34,-11Z"/>
19+
</group>
20+
</vector>

wear/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ android {
2525
// Wear OS variant rides on the same package as the phone, so we offset
2626
// its versionCode by 100000 to keep them distinct in Play Console while
2727
// preserving the phone-side numbering (37 -> 100037).
28-
versionCode = 100037
29-
versionName = "0.4.5"
28+
versionCode = 100038
29+
versionName = "0.5.0"
3030
}
3131

3232
signingConfigs {

0 commit comments

Comments
 (0)