my swift app for VT gyms gymtracker.jackhannon.net

Add container background to widget views for improved appearance

- Implemented a clear container background for McComas, War Memorial, Bouldering Wall, and Rectangular widgets to enhance visual integration.
- Replaced Divider with a styled Rectangle in SmallWidgetView for a more consistent design across widget components.

+12 -6
+4
GymTrackerWidget/GymTrackerLockscreenWidget.swift
··· 173 173 var body: some WidgetConfiguration { 174 174 StaticConfiguration(kind: kind, provider: UnifiedGymTrackerProvider()) { entry in 175 175 McComasCircularWidgetView(entry: entry) 176 + .containerBackground(for: .widget) { Color.clear } 176 177 } 177 178 .configurationDisplayName("McComas") 178 179 .description("McComas gym occupancy") ··· 187 188 var body: some WidgetConfiguration { 188 189 StaticConfiguration(kind: kind, provider: UnifiedGymTrackerProvider()) { entry in 189 190 WarMemorialCircularWidgetView(entry: entry) 191 + .containerBackground(for: .widget) { Color.clear } 190 192 } 191 193 .configurationDisplayName("War Memorial") 192 194 .description("War Memorial gym occupancy") ··· 201 203 var body: some WidgetConfiguration { 202 204 StaticConfiguration(kind: kind, provider: UnifiedGymTrackerProvider()) { entry in 203 205 BoulderingWallCircularWidgetView(entry: entry) 206 + .containerBackground(for: .widget) { Color.clear } 204 207 } 205 208 .configurationDisplayName("Bouldering Wall") 206 209 .description("Bouldering wall occupancy") ··· 215 218 var body: some WidgetConfiguration { 216 219 StaticConfiguration(kind: kind, provider: UnifiedGymTrackerProvider()) { entry in 217 220 RectangularLockScreenWidgetView(entry: entry) 221 + .containerBackground(for: .widget) { Color.clear } 218 222 } 219 223 .configurationDisplayName("VT Gyms") 220 224 .description("War Memorial, McComas, and Bouldering occupancy")
+8 -6
GymTrackerWidget/GymTrackerWidget.swift
··· 1 1 import WidgetKit 2 2 import SwiftUI 3 3 4 - // Ensure UnifiedTimelineProvider.swift is part of the same target/module 5 - 6 4 struct GymTrackerWidgetEntryView: View { 7 5 var entry: UnifiedGymTrackerEntry 8 6 @Environment(\.widgetFamily) var widgetFamily ··· 97 95 widgetRenderingMode: widgetRenderingMode 98 96 ) 99 97 100 - Divider() 98 + Rectangle() 99 + .fill(Color.primary.opacity(0.2)) 100 + .frame(height: 1) 101 101 102 102 OccupancyRowView( 103 103 title: "McComas", ··· 113 113 widgetRenderingMode: widgetRenderingMode 114 114 ) 115 115 116 - Divider() 116 + Rectangle() 117 + .fill(Color.primary.opacity(0.2)) 118 + .frame(height: 1) 117 119 118 120 OccupancyRowView( 119 121 title: "Bouldering Wall", ··· 222 224 let widgetRenderingMode: WidgetRenderingMode 223 225 let totalSegments: Int 224 226 var segmentSpacing: Double = 2.0 225 - let isEmpty: Bool // New parameter to indicate empty state 226 - let showPercentageSymbol: Bool // New parameter to control "%" display 227 + let isEmpty: Bool 228 + let showPercentageSymbol: Bool 227 229 228 230 private var segmentAngle: Double { 229 231 (360.0 / Double(totalSegments)) - segmentSpacing