Fix push subscription settings GroupBox background in dark mode

Closes #470
This commit is contained in:
Shadowfacts 2024-04-16 11:37:36 -04:00
parent a92cf8c812
commit ee5f9a62ff
1 changed files with 14 additions and 0 deletions

View File

@ -77,6 +77,7 @@ private struct PushSubscriptionSettingsView: View {
// status notifications not supported until we can enable/disable them in the app
}
}
.groupBoxStyle(AppBackgroundGroupBoxStyle())
}
private var allSupportedAlertTypes: PushSubscription.Alerts {
@ -125,6 +126,19 @@ private extension PushSubscription.Policy {
}
}
private struct AppBackgroundGroupBoxStyle: GroupBoxStyle {
func makeBody(configuration: Configuration) -> some View {
VStack(alignment: .leading, spacing: 16) {
configuration.label
.font(.headline)
configuration.content
}
.padding()
.background(Color.appGroupedBackground, in: RoundedRectangle(cornerRadius: 8))
}
}
//#Preview {
// PushSubscriptionView()
//}