@@ -20,22 +20,22 @@ private struct AccentColorKey: EnvironmentKey {
2020 static let defaultValue = Color . accentColor
2121}
2222
23- private struct SecondaryBackgroundColorKey : EnvironmentKey {
23+ private struct BackgroundColorKey : EnvironmentKey {
2424 static let defaultValue : Color = {
2525 #if os(iOS)
26- return Color ( uiColor: . secondarySystemGroupedBackground )
26+ return Color ( uiColor: . systemGroupedBackground )
2727 #else
28- return Color ( nsColor: . textBackgroundColor )
28+ return Color ( nsColor: . windowBackgroundColor )
2929 #endif
3030 } ( )
3131}
3232
33- private struct BackgroundColorKey : EnvironmentKey {
33+ private struct SecondaryBackgroundColorKey : EnvironmentKey {
3434 static let defaultValue : Color = {
3535 #if os(iOS)
36- return Color ( uiColor: . systemGroupedBackground )
36+ return Color ( uiColor: . secondarySystemGroupedBackground )
3737 #else
38- return Color ( nsColor: . windowBackgroundColor )
38+ return Color ( nsColor: . textBackgroundColor )
3939 #endif
4040 } ( )
4141}
@@ -60,44 +60,43 @@ extension EnvironmentValues {
6060 }
6161
6262 /// For outer views.
63- var settingSecondaryBackgroundColor : Color {
64- get { self [ SecondaryBackgroundColorKey . self] }
65- set { self [ SecondaryBackgroundColorKey . self] = newValue }
66- }
67-
68- /// For inner views.
6963 var settingBackgroundColor : Color {
7064 get { self [ BackgroundColorKey . self] }
7165 set { self [ BackgroundColorKey . self] = newValue }
7266 }
73- }
7467
68+ /// For inner views.
69+ var settingSecondaryBackgroundColor : Color {
70+ get { self [ SecondaryBackgroundColorKey . self] }
71+ set { self [ SecondaryBackgroundColorKey . self] = newValue }
72+ }
73+ }
7574
76- //var settingPrimaryColor: Color {
75+ // var settingPrimaryColor: Color {
7776// get { self[PrimaryColorKey.self] }
7877// set { self[PrimaryColorKey.self] = newValue }
79- //}
78+ // }
8079//
8180///// For secondary labels.
82- //var settingSecondaryColor: Color {
81+ // var settingSecondaryColor: Color {
8382// get { self[SecondaryColorKey.self] }
8483// set { self[SecondaryColorKey.self] = newValue }
85- //}
84+ // }
8685//
8786///// For buttons.
88- //var settingAccentColor: Color {
87+ // var settingAccentColor: Color {
8988// get { self[AccentColorKey.self] }
9089// set { self[AccentColorKey.self] = newValue }
91- //}
90+ // }
9291//
9392///// For outer views.
94- //var settingSecondaryBackgroundColor: Color {
93+ // var settingSecondaryBackgroundColor: Color {
9594// get { self[SecondaryBackgroundColorKey.self] }
9695// set { self[SecondaryBackgroundColorKey.self] = newValue }
97- //}
96+ // }
9897//
9998///// For inner views.
100- //var settingBackgroundColor: Color {
99+ // var settingBackgroundColor: Color {
101100// get { self[BackgroundColorKey.self] }
102101// set { self[BackgroundColorKey.self] = newValue }
103- //}
102+ // }
0 commit comments