diff --git a/CHANGELOG.md b/CHANGELOG.md index ac6cc134..2314b653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Restricted profile not updated. [#481](https://github.com/passepartoutvpn/passepartout-apple/pull/481) +- Selection and switch have the same color in organizer. [#458](https://github.com/passepartoutvpn/passepartout-apple/issues/458) ## 2.3.5 (2024-01-19) diff --git a/Passepartout/App/Constants/Theme.swift b/Passepartout/App/Constants/Theme.swift index 08ea7648..cfabac68 100644 --- a/Passepartout/App/Constants/Theme.swift +++ b/Passepartout/App/Constants/Theme.swift @@ -134,11 +134,14 @@ extension View { #endif } - @ViewBuilder - private func themeTint() -> some View { + func themeTint() -> some View { tint(.accentColor) } + func themeListSelectionColor() -> some View { + tint(Color.gray.opacity(0.6)) + } + private func themeListStyleValue() -> some ListStyle { #if !os(tvOS) .insetGrouped diff --git a/Passepartout/App/Views/OrganizerView+Profiles.swift b/Passepartout/App/Views/OrganizerView+Profiles.swift index 7e1a0e0f..6be8a8bb 100644 --- a/Passepartout/App/Views/OrganizerView+Profiles.swift +++ b/Passepartout/App/Views/OrganizerView+Profiles.swift @@ -97,7 +97,9 @@ private extension OrganizerView.ProfilesList { profilesView } } - }.themeAnimation(on: profileManager.headers) + } + .themeAnimation(on: profileManager.headers) + .themeListSelectionColor() } var profilesView: some View { @@ -117,7 +119,8 @@ private extension OrganizerView.ProfilesList { ProfileView() } label: { profileLabel(forProfile: profile) - }.contextMenu { + } + .contextMenu { OrganizerView.ProfileContextMenu(header: profile.header) } } @@ -133,15 +136,6 @@ private extension OrganizerView.ProfilesList { var sortedProfiles: [Profile] { profileManager.profiles .sorted() -// .sorted { -// if profileManager.isActiveProfile($0.id) { -// return true -// } else if profileManager.isActiveProfile($1.id) { -// return false -// } else { -// return $0 < $1 -// } -// } } } diff --git a/Passepartout/App/Views/VPNToggle.swift b/Passepartout/App/Views/VPNToggle.swift index e0531fdf..31d8d6d6 100644 --- a/Passepartout/App/Views/VPNToggle.swift +++ b/Passepartout/App/Views/VPNToggle.swift @@ -60,6 +60,8 @@ struct VPNToggle: View { Toggle(title, isOn: isEnabled) .disabled(!canToggle) .themeAnimation(on: currentVPNState.isEnabled) + // .tint(.accent) // XXX: #458, this does not work + .tint(Color(.accent)) } }