Looper UI: make the selected track dot read as active

A selected-but-empty track (e.g. A in the clear state) previously showed only a
thin white ring on a dim dot — easy to read as "not lit." Give the selected
track a bright letter and a lighter fill so the active track is obvious even
before it's recorded. Combined with the poll re-subscribe fix, the dots now
track the live selection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 22:19:14 -07:00
parent 2ce6dda9da
commit 4e58c9bd9b
@@ -34,6 +34,7 @@ struct LooperTimelineView: View {
private static let dotDiameter: CGFloat = 18 private static let dotDiameter: CGFloat = 18
private static let dotLabelFontSize: CGFloat = 10 private static let dotLabelFontSize: CGFloat = 10
private static let dotBrightness: Double = 0.16 private static let dotBrightness: Double = 0.16
private static let selectedDotBrightness: Double = 0.32
private static let dotFilledOpacity: Double = 0.55 private static let dotFilledOpacity: Double = 0.55
private static let dotEmptyOpacity: Double = 0.45 private static let dotEmptyOpacity: Double = 0.45
private static let activeRingWidth: CGFloat = 1.5 private static let activeRingWidth: CGFloat = 1.5
@@ -114,11 +115,13 @@ struct LooperTimelineView: View {
} label: { } label: {
Text(LooperTimelineView.dotLabels[index]) Text(LooperTimelineView.dotLabels[index])
.font(.system(size: LooperTimelineView.dotLabelFontSize, weight: .bold, design: .monospaced)) .font(.system(size: LooperTimelineView.dotLabelFontSize, weight: .bold, design: .monospaced))
.foregroundStyle(hasContent ? Color.white : Color.white.opacity(LooperTimelineView.dotEmptyOpacity)) // Selected (or recorded) tracks show a bright letter; other empty tracks dim.
.foregroundStyle((hasContent || isSelected) ? Color.white : Color.white.opacity(LooperTimelineView.dotEmptyOpacity))
.frame(width: LooperTimelineView.dotDiameter, height: LooperTimelineView.dotDiameter) .frame(width: LooperTimelineView.dotDiameter, height: LooperTimelineView.dotDiameter)
.background( .background(
Circle().fill(hasContent ? Color.green.opacity(LooperTimelineView.dotFilledOpacity) Circle().fill(hasContent ? Color.green.opacity(LooperTimelineView.dotFilledOpacity)
: Color(white: LooperTimelineView.dotBrightness)) : (isSelected ? Color(white: LooperTimelineView.selectedDotBrightness)
: Color(white: LooperTimelineView.dotBrightness)))
) )
.overlay(muteSlash(isMuted)) .overlay(muteSlash(isMuted))
.overlay( .overlay(