customize text color
This commit is contained in:
@@ -20,7 +20,8 @@ struct SettingsView: View {
|
||||
@AppStorage(UserDefaultsStore.Keys.useCloudKit.rawValue, store: GroupUserDefaults.groupDefaults) private var useCloudKit = false
|
||||
@AppStorage(UserDefaultsStore.Keys.deleteEnable.rawValue, store: GroupUserDefaults.groupDefaults) private var deleteEnabled = true
|
||||
@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
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack {
|
||||
@@ -86,13 +87,13 @@ struct SettingsView: View {
|
||||
}
|
||||
}, label: {
|
||||
Text(String(localized: "settings_view_special_thanks_to_title"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
|
||||
if showSpecialThanks {
|
||||
Text(String(localized: "settings_view_special_thanks_to_body"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
@@ -108,7 +109,7 @@ struct SettingsView: View {
|
||||
PersistenceController.shared.populateTestData()
|
||||
}, label: {
|
||||
Text("Add test data")
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
}
|
||||
@@ -123,7 +124,7 @@ struct SettingsView: View {
|
||||
PersistenceController.shared.clearDB()
|
||||
}, label: {
|
||||
Text("Clear DB")
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
}
|
||||
@@ -141,12 +142,12 @@ struct SettingsView: View {
|
||||
}
|
||||
}, label: {
|
||||
Text(String(localized: "settings_view_why_bg_mode_title"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
if showWhyBGMode {
|
||||
Text(String(localized: "settings_view_why_bg_mode_body"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
@@ -166,7 +167,7 @@ struct SettingsView: View {
|
||||
showOnboarding.toggle()
|
||||
}, label: {
|
||||
Text(String(localized: "settings_view_show_onboarding"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
}
|
||||
@@ -180,11 +181,11 @@ struct SettingsView: View {
|
||||
VStack {
|
||||
Toggle(isOn: $useCloudKit, label: {
|
||||
Text(String(localized: "settings_use_cloudkit_title"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
Text(String(localized: "settings_use_cloudkit_body"))
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
.padding(.bottom)
|
||||
}
|
||||
@@ -199,7 +200,7 @@ struct SettingsView: View {
|
||||
Image(systemName: syncMonitor.syncStateSummary.symbolName)
|
||||
.foregroundColor(syncMonitor.syncStateSummary.symbolColor)
|
||||
Text( syncMonitor.syncStateSummary.isBroken ? "cloudkit is broken" : "cloudkit is good")
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
@@ -213,7 +214,7 @@ struct SettingsView: View {
|
||||
VStack {
|
||||
Toggle(String(localized: "settings_use_delete_enable"),
|
||||
isOn: $deleteEnabled)
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
@@ -344,7 +345,7 @@ struct SettingsView: View {
|
||||
|
||||
}, label: {
|
||||
Text("Create random icons")
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.padding()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user