Minimize Dynamic Island, show direction letters instead of signs, fix inverted pitch bubble
- Dynamic Island now shows only the level icon (compact/minimal); the
bubble, instruction text, and numbers move to the shared lock
screen/CarPlay ActivityView, which iOS renders identically on both
surfaces (no separate CarPlay layout API exists for this).
- Replace +/- signs with a leading direction letter (H/F for Heck-
Front, R/L for rechts-links) via a new shared LevelDirectionFormatting
helper, used by the level screen, alignment assistant, and dashboard
card. The generic "Messwerte" list keeps raw signed values.
- Live Activity's instruction now reads as two lines ("Heck steht
höher 1.8°" / "links steht höher 0.9°") instead of a sentence plus a
separate number column.
- Fix the bubble level graphic's pitch axis being inverted (front/rear
reversed) in all three copies (app, watch, Live Activity widget) —
confirmed against the known-correct VehicleTiltView orientation.
- Dashboard card shows pitch and roll side by side, large, without the
"Längsneigung"/"Querneigung" labels, for the leveling device.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
9a3b5cb472
commit
4a8a40eea2
@@ -13,6 +13,8 @@ struct DeviceCard: View {
|
||||
|
||||
if isShowingLastSettings, let snapshot {
|
||||
lastSettings(for: snapshot)
|
||||
} else if let snapshot, snapshot.primaryMetric != nil, device.role == .leveling {
|
||||
levelReadout(for: snapshot)
|
||||
} else if let snapshot, let primary = snapshot.primaryMetric {
|
||||
HStack(alignment: .firstTextBaseline, spacing: 4) {
|
||||
Text(primary.formatted)
|
||||
@@ -115,6 +117,21 @@ struct DeviceCard: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Für die Nivellierung: Front/Heck und links/rechts nebeneinander, groß,
|
||||
/// ohne "Längsneigung"/"Querneigung"-Beschriftung – die Richtung steht ja
|
||||
/// schon im vorangestellten Buchstaben.
|
||||
private func levelReadout(for snapshot: DeviceSnapshot) -> some View {
|
||||
let pitch = snapshot.metrics.first(where: { $0.key == "pitch" })?.value
|
||||
let roll = snapshot.metrics.first(where: { $0.key == "roll" })?.value
|
||||
return HStack(spacing: 24) {
|
||||
Text(LevelDirectionFormatting.pitchTile(pitch))
|
||||
Text(LevelDirectionFormatting.rollTile(roll))
|
||||
}
|
||||
.font(.system(size: 36, weight: .semibold, design: .rounded))
|
||||
.contentTransition(.numericText())
|
||||
.foregroundStyle(snapshot.isStale ? .secondary : .primary)
|
||||
}
|
||||
|
||||
private func secondaryValues(for snapshot: DeviceSnapshot) -> some View {
|
||||
let others = snapshot.metrics
|
||||
.filter { $0.id != snapshot.primaryMetric?.id && $0.value != nil }
|
||||
|
||||
Reference in New Issue
Block a user