Tilt the complication dumbbell to match the app icon
Rotate the dumbbell glyph -35° (counter-clockwise) in the circular, corner, and rectangular accessory families so it runs lower-left to upper-right like the app icon. Inline stays upright since that template renders the symbol on the time line.
This commit is contained in:
@@ -30,22 +30,32 @@ private struct LauncherView: View {
|
|||||||
|
|
||||||
private let glyph = "dumbbell.fill"
|
private let glyph = "dumbbell.fill"
|
||||||
|
|
||||||
|
// The app icon's dumbbell runs lower-left to upper-right; tilt the glyph
|
||||||
|
// counter-clockwise to match (SwiftUI rotates clockwise for positive angles).
|
||||||
|
private var dumbbell: some View {
|
||||||
|
Image(systemName: glyph)
|
||||||
|
.rotationEffect(.degrees(-35))
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
switch family {
|
switch family {
|
||||||
case .accessoryInline:
|
case .accessoryInline:
|
||||||
|
// Inline templates render the symbol upright next to text; leave as-is.
|
||||||
Label("Workouts", systemImage: glyph)
|
Label("Workouts", systemImage: glyph)
|
||||||
case .accessoryRectangular:
|
case .accessoryRectangular:
|
||||||
Label("Workouts", systemImage: glyph)
|
HStack(spacing: 6) {
|
||||||
.font(.headline)
|
dumbbell.font(.title3)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)
|
Text("Workouts").font(.headline)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)
|
||||||
case .accessoryCorner:
|
case .accessoryCorner:
|
||||||
Image(systemName: glyph)
|
dumbbell
|
||||||
.font(.title2)
|
.font(.title2)
|
||||||
.widgetLabel("Workouts")
|
.widgetLabel("Workouts")
|
||||||
default: // .accessoryCircular and any future families
|
default: // .accessoryCircular and any future families
|
||||||
ZStack {
|
ZStack {
|
||||||
AccessoryWidgetBackground()
|
AccessoryWidgetBackground()
|
||||||
Image(systemName: glyph)
|
dumbbell
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user