Skip to content

Commit

Permalink
Update margins on SolarChartWidgetView
Browse files Browse the repository at this point in the history
  • Loading branch information
daneden committed Sep 21, 2023
1 parent 53a42aa commit 303dd27
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Widget/Solar Chart Widget/SolarChartWidgetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import WidgetKit
import Solar

struct SolarChartWidgetView: View {
@Environment(\.widgetContentMargins) var contentMargins

var entry: SolsticeWidgetTimelineEntry

var solar: Solar? {
Expand Down Expand Up @@ -48,21 +50,21 @@ struct SolarChartWidgetView: View {
.font(.caption)
.widgetAccentable()
.contentTransition(.numericText())
.padding(4)
.padding(contentMargins)

DaylightChart(
solar: solar,
timeZone: location.timeZone,
eventTypes: [],
includesSummaryTitle: false,
markSize: 3,
yScale: -1.0...3.0
yScale: -1.0...2.0
)
.padding(.horizontal, -1)
}
} else {
WidgetMissingLocationView()
.padding()
.padding(contentMargins)
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
Expand Down

0 comments on commit 303dd27

Please sign in to comment.