From d5b1f134340588db3fccc6dc197fd8d955de2967 Mon Sep 17 00:00:00 2001 From: Robin Kutesa Date: Mon, 18 May 2026 23:54:34 +0300 Subject: [PATCH] Settings: fix appearance picker in dark mode Use UIColor.secondarySystemGroupedBackground / tertiarySystemFill so the segmented control adapts correctly to light and dark mode; darken the shadow in dark mode so the selected pill is still visible. Co-Authored-By: Kutesir Co-Authored-By: Sentry --- Features/Settings/SettingsView.swift | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Features/Settings/SettingsView.swift b/Features/Settings/SettingsView.swift index 7d0990b..255d771 100644 --- a/Features/Settings/SettingsView.swift +++ b/Features/Settings/SettingsView.swift @@ -71,6 +71,8 @@ struct SettingsView: View { // MARK: — Appearance + @Environment(\.colorScheme) private var colorScheme + private var appearanceSection: some View { VStack(alignment: .leading, spacing: 8) { sectionLabel("APPEARANCE") @@ -94,16 +96,23 @@ struct SettingsView: View { .padding(.vertical, 9) .background( RoundedRectangle(cornerRadius: 8, style: .continuous) - .fill(selected ? AppTheme.surfaceRaised : Color.clear) - .shadow(color: selected ? .black.opacity(0.08) : .clear, - radius: 4, x: 0, y: 1) + .fill(selected + ? Color(UIColor.secondarySystemGroupedBackground) + : Color.clear) + .shadow( + color: selected + ? (colorScheme == .dark ? .black.opacity(0.35) : .black.opacity(0.08)) + : .clear, + radius: colorScheme == .dark ? 2 : 4, + x: 0, y: colorScheme == .dark ? 1 : 1 + ) ) } .buttonStyle(PlainButtonStyle()) } } .padding(3) - .background(AppTheme.surfaceSunken) + .background(Color(UIColor.tertiarySystemFill)) .clipShape(RoundedRectangle(cornerRadius: 11, style: .continuous)) } }