Add Orbit style for voting layout and entry views

- Add orbit case to VotingLayoutStyle enum with celestial design
- Create OrbitVotingView with center core and orbiting mood planets
- Add orbit case to DayViewStyle enum for entry list
- Create OrbitEntryView with mood icon center and orbiting day number
- Add orbit icons to voting and entry style pickers in CustomizeView

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-26 22:33:53 -06:00
parent 16af463569
commit f45f52ccbf
5 changed files with 361 additions and 0 deletions

View File

@@ -571,6 +571,22 @@ struct VotingLayoutPickerCompact: View {
}
}
}
case .orbit:
// Center core with orbiting planets
ZStack {
Circle()
.stroke(Color.primary.opacity(0.2), lineWidth: 1)
.frame(width: 32, height: 32)
Circle()
.fill(Color.primary.opacity(0.8))
.frame(width: 8, height: 8)
ForEach(0..<5, id: \.self) { index in
Circle()
.fill(Color.accentColor)
.frame(width: 6, height: 6)
.offset(orbitOffset(index: index, total: 5, radius: 16))
}
}
}
}
@@ -578,6 +594,13 @@ struct VotingLayoutPickerCompact: View {
let angle = Double.pi - (Double.pi * Double(index) / Double(total - 1))
return CGSize(width: radius * CGFloat(cos(angle)), height: -radius * CGFloat(sin(angle)) + 4)
}
private func orbitOffset(index: Int, total: Int, radius: CGFloat) -> CGSize {
let startAngle = -Double.pi / 2
let angleStep = (2 * Double.pi) / Double(total)
let angle = startAngle + angleStep * Double(index)
return CGSize(width: radius * CGFloat(cos(angle)), height: radius * CGFloat(sin(angle)))
}
}
// MARK: - Custom Widget Section
@@ -1216,6 +1239,20 @@ struct DayViewStylePickerCompact: View {
.frame(width: 20, height: 4)
}
}
case .orbit:
// Celestial orbit style
ZStack {
Circle()
.stroke(Color.primary.opacity(0.15), lineWidth: 1)
.frame(width: 28, height: 28)
Circle()
.fill(Color.primary.opacity(0.8))
.frame(width: 8, height: 8)
Circle()
.fill(Color.accentColor)
.frame(width: 10, height: 10)
.offset(x: 14, y: 0)
}
}
}
}

View File

@@ -132,6 +132,25 @@ struct VotingLayoutPickerView: View {
}
}
}
case .orbit:
// Center core with orbiting planets
ZStack {
// Orbital ring
Circle()
.stroke(Color.primary.opacity(0.2), lineWidth: 1)
.frame(width: 32, height: 32)
// Center core
Circle()
.fill(Color.primary.opacity(0.8))
.frame(width: 8, height: 8)
// Orbiting planets
ForEach(0..<5, id: \.self) { index in
Circle()
.fill(Color.accentColor)
.frame(width: 6, height: 6)
.offset(orbitOffset(index: index, total: 5, radius: 16))
}
}
}
}
@@ -142,6 +161,17 @@ struct VotingLayoutPickerView: View {
height: -radius * CGFloat(sin(angle)) + 4
)
}
private func orbitOffset(index: Int, total: Int, radius: CGFloat) -> CGSize {
// Start from top (-π/2) and go clockwise
let startAngle = -Double.pi / 2
let angleStep = (2 * Double.pi) / Double(total)
let angle = startAngle + angleStep * Double(index)
return CGSize(
width: radius * CGFloat(cos(angle)),
height: radius * CGFloat(sin(angle))
)
}
}
struct VotingLayoutPickerView_Previews: PreviewProvider {