Skip to content

Commit

Permalink
Fix dark mode appearance (#19)
Browse files Browse the repository at this point in the history
# Fix dark mode appearance

## ♻️ Current situation & Problem
This PR fixes appearance in dark mode. Due to refactorings to lists in
#18, we know have to adapt to different backgrounds (e.g., placed
directly into a view, placed into a grouped background view, like a List
cell).
This was primarily an issue as we used a background color instead of a
fill color (see
[tertiarySystemFill](https://developer.apple.com/documentation/uikit/uicolor/3255076-tertiarysystemfill)
being recommended for buttons and compare to
[secondarySystemBackground](https://developer.apple.com/documentation/uikit/uicolor/3173137-secondarysystembackground)
which we previously used).


## ⚙️ Release Notes 
* Fixes appearance in light background when appearing in Lists.


## 📚 Documentation
--


## ✅ Testing
--


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Nov 17, 2023
1 parent bd38bd7 commit 0751541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SpeziContact/Contact Views/ContactView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public struct ContactView: View {
Button(action: openMaps) {
ZStack {
RoundedRectangle(cornerRadius: 10)
.foregroundStyle(Color(uiColor: .secondarySystemBackground))
.foregroundStyle(Color(uiColor: .tertiarySystemFill))
HStack(alignment: .top) {
VStack(alignment: .leading, spacing: 4) {
Text("Address", bundle: .module, comment: "Contact Button Title")
Expand Down Expand Up @@ -182,7 +182,7 @@ public struct ContactView: View {
Button(action: contactOption.action) {
ZStack {
RoundedRectangle(cornerRadius: 10)
.foregroundStyle(Color(uiColor: .secondarySystemBackground))
.foregroundStyle(Color(uiColor: .tertiarySystemFill))
VStack(spacing: 8) {
contactOption.image
.font(.title3)
Expand Down

0 comments on commit 0751541

Please sign in to comment.