From 9ff97574f3f08847c2c9ee8b33b70e30ca478d4d Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 29 Sep 2024 13:11:20 -0500 Subject: [PATCH] ui: settingsview listrowbackground color --- .../View/Settings/SettingsView.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/BDKSwiftExampleWallet/View/Settings/SettingsView.swift b/BDKSwiftExampleWallet/View/Settings/SettingsView.swift index 285f576a..38644295 100644 --- a/BDKSwiftExampleWallet/View/Settings/SettingsView.swift +++ b/BDKSwiftExampleWallet/View/Settings/SettingsView.swift @@ -9,6 +9,7 @@ import BitcoinUI import SwiftUI struct SettingsView: View { + @Environment(\.colorScheme) var colorScheme @Environment(\.dismiss) private var dismiss @ObservedObject var viewModel: SettingsViewModel @State private var isSeedPresented = false @@ -44,6 +45,9 @@ struct SettingsView: View { } } } + .listRowBackground( + colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2) + ) Section(header: Text("Wallet")) { Button { @@ -61,6 +65,9 @@ struct SettingsView: View { .animation(.easeInOut, value: viewModel.inspectedScripts) } } + .listRowBackground( + colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2) + ) Section(header: Text("Danger Zone")) { Button { @@ -70,6 +77,9 @@ struct SettingsView: View { .foregroundStyle(.red) } } + .listRowBackground( + colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2) + ) Section(header: Text("Destructive Zone")) { Button { @@ -81,6 +91,9 @@ struct SettingsView: View { } } } + .listRowBackground( + colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2) + ) } .background(Color(uiColor: UIColor.systemBackground))