Skip to content

Commit 7259dc9

Browse files
committed
Fixed colors in template 2
1 parent 9f5d58e commit 7259dc9

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

RevenueCatUI/Data/TestData.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,19 @@ internal enum TestData {
167167
colors: .init(
168168
light: .init(
169169
background: "#FFFFFF",
170-
text1: "#000000",
170+
text1: "#111111",
171171
callToActionBackground: "#EC807C",
172172
callToActionForeground: "#FFFFFF",
173-
accent1: "#BC66FF"
173+
accent1: "#BC66FF",
174+
accent2: "#111100"
174175
),
175176
dark: .init(
176177
background: "#000000",
177-
text1: "#FFFFFF",
178+
text1: "#EEEEEE",
178179
callToActionBackground: "#ACD27A",
179180
callToActionForeground: "#000000",
180-
accent1: "#B022BB"
181+
accent1: "#B022BB",
182+
accent2: "#EEDDEE"
181183
)
182184
),
183185
blurredBackgroundImage: true,

RevenueCatUI/Templates/MultiPackageBoldTemplate.swift

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ private struct MultiPackageTemplateContent: View {
8383
Spacer()
8484

8585
Text(self.selectedLocalization.title)
86+
.foregroundColor(self.configuration.colors.text1Color)
8687
.font(.largeTitle.bold())
8788

8889
Spacer()
8990

9091
Text(self.selectedLocalization.subtitle ?? "")
92+
.foregroundColor(self.configuration.colors.text1Color)
9193
.font(.title3)
9294

9395
Spacer()
@@ -128,7 +130,7 @@ private struct MultiPackageTemplateContent: View {
128130
EmptyView()
129131
} else {
130132
Circle()
131-
.foregroundColor(Self.selectedBackgroundColor.opacity(0.5))
133+
.foregroundColor(self.selectedBackgroundColor.opacity(0.5))
132134
}
133135
}
134136

@@ -165,7 +167,7 @@ private struct MultiPackageTemplateContent: View {
165167
RoundedRectangle(cornerRadius: Self.cornerRadius, style: .continuous)
166168
.foregroundColor(
167169
selected
168-
? Self.selectedBackgroundColor
170+
? self.selectedBackgroundColor
169171
: .clear
170172
)
171173
}
@@ -213,18 +215,11 @@ private struct MultiPackageTemplateContent: View {
213215
.padding(.top)
214216
}
215217

218+
private var selectedBackgroundColor: Color { self.configuration.colors.accent2Color }
219+
216220
private static let iconSize: CGFloat = 100
217221
private static let cornerRadius: CGFloat = 15
218222

219-
#if !os(macOS) && !os(watchOS)
220-
private static let selectedBackgroundColor: Color = .init(
221-
light: .init(white: 0.3),
222-
dark: .init(white: 0.6)
223-
)
224-
#else
225-
private static let selectedBackgroundColor: Color = .init(white: 0.3)
226-
#endif
227-
228223
}
229224

230225
// MARK: - Extensions
21.3 KB
Loading
44.5 KB
Loading

Tests/TestingApps/SimpleApp/SimpleApp/SamplePaywalls.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ private extension SamplePaywallLoader {
101101
text1: "#000000",
102102
callToActionBackground: "#EC807C",
103103
callToActionForeground: "#FFFFFF",
104-
accent1: "#BC66FF"
104+
accent1: "#BC66FF",
105+
accent2: "#222222"
105106
),
106107
dark: .init(
107108
background: "#000000",
108109
text1: "#FFFFFF",
109110
callToActionBackground: "#ACD27A",
110111
callToActionForeground: "#000000",
111-
accent1: "#B022BB"
112+
accent1: "#B022BB",
113+
accent2: "#CCCCCC"
112114
)
113115
),
114116
blurredBackgroundImage: true,

0 commit comments

Comments
 (0)