built out themes a bit more
This commit is contained in:
@@ -20,7 +20,7 @@ struct AddMoodHeaderView: View {
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
|
||||
VStack {
|
||||
Text(self.getTitle())
|
||||
@@ -47,7 +47,7 @@ struct AddMoodHeaderView: View {
|
||||
.padding([.leading, .trailing, .bottom])
|
||||
}
|
||||
.background(
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.frame(minHeight: 88, maxHeight: 150)
|
||||
|
||||
@@ -203,7 +203,7 @@ struct ContentView: View {
|
||||
)
|
||||
}
|
||||
.background(
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
.coordinateSpace(name: "scroll")
|
||||
.onPreferenceChange(ViewOffsetKey.self) { value in
|
||||
@@ -223,7 +223,7 @@ struct ContentView: View {
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding()
|
||||
.background(
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ struct ContentView: View {
|
||||
|
||||
private var emptyView: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
|
||||
VStack {
|
||||
Text(String(localized: "content_view_empty_title"))
|
||||
@@ -347,7 +347,7 @@ struct ContentView: View {
|
||||
VStack {
|
||||
SmallRollUpHeaderView(fakeData: false, backDays: 30)
|
||||
.background(
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.padding()
|
||||
@@ -365,7 +365,7 @@ struct ContentView: View {
|
||||
}
|
||||
.padding(.bottom, 5)
|
||||
.background(
|
||||
theme.bg
|
||||
theme.currentTheme.bg
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ struct FilterView: View {
|
||||
}
|
||||
.padding(.bottom, 5)
|
||||
.background(
|
||||
theme.bg
|
||||
theme.currentTheme.bg
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
)
|
||||
}
|
||||
@@ -81,7 +81,7 @@ struct FilterView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(Color(UIColor.label))
|
||||
.background(Color(theme.secondaryBGColor))
|
||||
.background(Color(theme.currentTheme.secondaryBGColor))
|
||||
.cornerRadius(10)
|
||||
}).frame(maxWidth: .infinity)
|
||||
}
|
||||
@@ -103,7 +103,7 @@ struct FilterView: View {
|
||||
|
||||
private var statsView: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
@@ -120,7 +120,7 @@ struct FilterView: View {
|
||||
VStack {
|
||||
VStack {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
DatePicker(
|
||||
String(localized: "filter_view_begin_date"),
|
||||
selection: $viewModel.entryStartDate,
|
||||
@@ -135,7 +135,7 @@ struct FilterView: View {
|
||||
.padding([.leading, .trailing])
|
||||
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
DatePicker(
|
||||
String(localized: "filter_view_end_date"),
|
||||
selection: $viewModel.entryEndDate,
|
||||
@@ -150,7 +150,7 @@ struct FilterView: View {
|
||||
.padding([.leading, .trailing])
|
||||
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
HStack {
|
||||
Spacer()
|
||||
ForEach(weekdays.indices, id: \.self) { dayIdx in
|
||||
@@ -204,7 +204,7 @@ struct FilterView: View {
|
||||
.font(.title)
|
||||
yearGridView(yearData: yearData, columns: columns)
|
||||
.background(
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
.cornerRadius(10)
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ struct SettingsView: View {
|
||||
})
|
||||
}
|
||||
.background(
|
||||
theme.bg
|
||||
theme.currentTheme.bg
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
)
|
||||
}
|
||||
@@ -79,7 +79,7 @@ struct SettingsView: View {
|
||||
|
||||
private var specialThanksCell: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Button(action: {
|
||||
withAnimation{
|
||||
@@ -102,7 +102,7 @@ struct SettingsView: View {
|
||||
|
||||
private var addTestDataCell: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
Button(action: {
|
||||
PersistenceController.shared.populateTestData()
|
||||
editedDataClosure()
|
||||
@@ -117,7 +117,7 @@ struct SettingsView: View {
|
||||
|
||||
private var clearDB: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
Button(action: {
|
||||
PersistenceController.shared.clearDB()
|
||||
editedDataClosure()
|
||||
@@ -132,7 +132,7 @@ struct SettingsView: View {
|
||||
|
||||
private var whyBackgroundMode: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Button(action: {
|
||||
withAnimation{
|
||||
@@ -159,7 +159,7 @@ struct SettingsView: View {
|
||||
|
||||
private var changeIcon: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Text(String(localized: "settings_view_change_icon"))
|
||||
HStack {
|
||||
@@ -196,7 +196,7 @@ struct SettingsView: View {
|
||||
|
||||
private var showOnboardingButton: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
Button(action: {
|
||||
showOnboarding.toggle()
|
||||
}, label: {
|
||||
@@ -210,7 +210,7 @@ struct SettingsView: View {
|
||||
|
||||
private var cloudKitEnable: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Toggle(String(localized: "settings_use_cloudkit_title"),
|
||||
isOn: $useCloudKit)
|
||||
@@ -228,7 +228,7 @@ struct SettingsView: View {
|
||||
|
||||
private var cloudKitStatus: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Image(systemName: syncMonitor.syncStateSummary.symbolName)
|
||||
.foregroundColor(syncMonitor.syncStateSummary.symbolColor)
|
||||
@@ -242,7 +242,7 @@ struct SettingsView: View {
|
||||
|
||||
private var canDelete: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Toggle(String(localized: "settings_use_delete_enable"),
|
||||
isOn: $deleteEnabled)
|
||||
@@ -255,7 +255,7 @@ struct SettingsView: View {
|
||||
|
||||
private var themePicker: some View {
|
||||
ZStack {
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
VStack {
|
||||
Text(String(localized: "settings_background_title"))
|
||||
HStack {
|
||||
@@ -265,7 +265,7 @@ struct SettingsView: View {
|
||||
theme = aTheme
|
||||
}, label: {
|
||||
VStack {
|
||||
aTheme.preview
|
||||
aTheme.currentTheme.preview
|
||||
.overlay(
|
||||
Circle()
|
||||
.stroke(Color(UIColor.systemGray), style: StrokeStyle(lineWidth: 2))
|
||||
|
||||
@@ -52,7 +52,7 @@ struct SwitchableView: View {
|
||||
.padding(.top, -12)
|
||||
}
|
||||
.background(
|
||||
Color(theme.secondaryBGColor)
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
|
||||
Reference in New Issue
Block a user