fix: fixed custom colors for background and text
798a815b
1 file(s) · +6 −2
| 100 | 100 | case .dark: |
|
| 101 | 101 | return darkBackgroundColor |
|
| 102 | 102 | case .automatic: |
|
| 103 | - | return Color(UIColor.systemBackground) |
|
| 103 | + | // Use appropriate custom color based on current system appearance |
|
| 104 | + | let isDark = UITraitCollection.current.userInterfaceStyle == .dark |
|
| 105 | + | return isDark ? darkBackgroundColor : lightBackgroundColor |
|
| 104 | 106 | } |
|
| 105 | 107 | } |
|
| 106 | 108 | ||
| 112 | 114 | case .dark: |
|
| 113 | 115 | return darkTextColor |
|
| 114 | 116 | case .automatic: |
|
| 115 | - | return Color(UIColor.label) |
|
| 117 | + | // Use appropriate custom color based on current system appearance |
|
| 118 | + | let isDark = UITraitCollection.current.userInterfaceStyle == .dark |
|
| 119 | + | return isDark ? darkTextColor : lightTextColor |
|
| 116 | 120 | } |
|
| 117 | 121 | } |
|
| 118 | 122 | ||