customize text color

This commit is contained in:
Trey t
2022-03-06 11:25:05 -06:00
parent 6ec0a9bb99
commit 7692f455c8
22 changed files with 225 additions and 92 deletions

View File

@@ -33,7 +33,8 @@ struct LongestStreakTemplate: View, SharingTemplate {
@Environment(\.presentationMode) var presentationMode
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = .black
let columns = [
GridItem(.flexible(minimum: 5, maximum: .infinity), alignment: .center),
GridItem(.flexible(minimum: 5, maximum: .infinity), alignment: .center),
@@ -115,7 +116,7 @@ struct LongestStreakTemplate: View, SharingTemplate {
VStack {
Text(String(format: String(localized: "share_view_longest_streak_template_title"), self.selectedMood.strValue))
.font(.title)
.foregroundColor(theme.currentTheme.labelColor)
.foregroundColor(textColor)
.frame(maxWidth: .infinity, alignment: .center)
.padding()
@@ -127,19 +128,19 @@ struct LongestStreakTemplate: View, SharingTemplate {
VStack {
Text(self.moodEntries.first?.forDate ?? Date(), formatter: itemFormatter)
.font(.title)
.foregroundColor(theme.currentTheme.labelColor)
.foregroundColor(textColor)
.frame(maxWidth: .infinity, alignment: .center)
.padding(.top, 1)
Text("-")
.font(.title)
.foregroundColor(theme.currentTheme.labelColor)
.foregroundColor(textColor)
.frame(maxWidth: .infinity, alignment: .center)
.padding(.top, 1)
Text(self.moodEntries.last?.forDate ?? Date(), formatter: itemFormatter)
.font(.title)
.foregroundColor(theme.currentTheme.labelColor)
.foregroundColor(textColor)
.frame(maxWidth: .infinity, alignment: .center)
.padding(.top, 1)
}
@@ -168,7 +169,7 @@ struct LongestStreakTemplate: View, SharingTemplate {
}, label: {
Text("Pick Mood")
.font(.title)
.foregroundColor(theme.currentTheme.labelColor)
.foregroundColor(textColor)
.padding()
})
.frame(maxWidth: .infinity, alignment: .center)