Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions SunHat/Views/Components/SettingsIconLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ struct SettingsIconLabel: View {
let systemImage: String
let color: Color

// A fixed-point icon frame stops scaling once the row's text grows with
// Dynamic Type, which the accessibility audit flags as "Dynamic Type
// font sizes are partially unsupported". @ScaledMetric ties the icon
// frame to the same text-size setting so it grows with the row.
@ScaledMetric(relativeTo: .body) private var iconDimension: CGFloat = 29
@ScaledMetric(relativeTo: .body) private var symbolSize: CGFloat = 14

var body: some View {
Label {
Text(title)
} icon: {
Image(systemName: systemImage)
.font(.system(size: 14, weight: .semibold))
.font(.system(size: symbolSize, weight: .semibold))
.foregroundStyle(.white)
.frame(width: 29, height: 29)
.frame(width: iconDimension, height: iconDimension)
.background(color.gradient, in: RoundedRectangle(cornerRadius: 6.5, style: .continuous))
}
}
Expand Down
2 changes: 1 addition & 1 deletion SunHat/Views/Reminders/AllRemindersView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ struct AllRemindersView: View {
.padding(.horizontal, 20)
.padding(.vertical, 10)
}
.buttonStyle(.glass)
.buttonStyle(.glassProminent)
.padding(.bottom, 20)
}
.sunHatSurface(tint: .accentColor, cornerRadius: 24, prominence: 0.70)
Expand Down
2 changes: 1 addition & 1 deletion SunHat/Views/Weather/WeatherView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct WeatherView: View {
} label: {
Text("Try Again", comment: "Retry button in the weather tab's unavailable state")
}
.buttonStyle(.glass)
.buttonStyle(.glassProminent)
}
.padding(.top, 60)
}
Expand Down