From ee5f9a62ff0090e1f5ce46ce66cf9dd6e8ed3644 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 16 Apr 2024 11:37:36 -0400 Subject: [PATCH] Fix push subscription settings GroupBox background in dark mode Closes #470 --- .../Notifications/PushSubscriptionView.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tusker/Screens/Preferences/Notifications/PushSubscriptionView.swift b/Tusker/Screens/Preferences/Notifications/PushSubscriptionView.swift index de24c5c6..936cbf32 100644 --- a/Tusker/Screens/Preferences/Notifications/PushSubscriptionView.swift +++ b/Tusker/Screens/Preferences/Notifications/PushSubscriptionView.swift @@ -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() //}