This commit is contained in:
Trey t
2022-02-26 12:11:08 -06:00
parent 09e1e96a0a
commit b1d3704e9f

View File

@@ -121,6 +121,13 @@ struct CustomizeView: View {
Text(aTheme.title) Text(aTheme.title)
} }
}) })
.contentShape(Rectangle())
.background(
RoundedRectangle(cornerRadius: 10, style: .continuous)
.fill(theme == aTheme ? theme.currentTheme.bgColor : .clear)
.padding(-5)
)
Spacer() Spacer()
} }
} }
@@ -173,6 +180,8 @@ struct CustomizeView: View {
theme.currentTheme.secondaryBGColor theme.currentTheme.secondaryBGColor
VStack { VStack {
ForEach(MoodImages.allCases, id: \.rawValue) { images in ForEach(MoodImages.allCases, id: \.rawValue) { images in
ZStack {
VStack {
HStack { HStack {
ForEach(Mood.allValues, id: \.self) { mood in ForEach(Mood.allValues, id: \.self) { mood in
images.icon(forMood: mood) images.icon(forMood: mood)
@@ -184,17 +193,26 @@ struct CustomizeView: View {
) )
} }
.frame(minWidth: 0, maxWidth: .infinity) .frame(minWidth: 0, maxWidth: .infinity)
}
.contentShape(Rectangle())
.background(
RoundedRectangle(cornerRadius: 10, style: .continuous)
.fill(imagePack == images ? theme.currentTheme.bgColor : .clear)
.padding([.top, .bottom], -3)
)
.onTapGesture { .onTapGesture {
let impactMed = UIImpactFeedbackGenerator(style: .heavy) let impactMed = UIImpactFeedbackGenerator(style: .heavy)
impactMed.impactOccurred() impactMed.impactOccurred()
imagePack = images imagePack = images
} }
}
if images.rawValue != (MoodImages.allCases.sorted(by: { $0.rawValue > $1.rawValue }).first?.rawValue) ?? 0 { if images.rawValue != (MoodImages.allCases.sorted(by: { $0.rawValue > $1.rawValue }).first?.rawValue) ?? 0 {
Divider() Divider()
} }
} }
} }
}
}
.padding() .padding()
} }
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
@@ -215,12 +233,19 @@ struct CustomizeView: View {
) )
} }
.frame(minWidth: 0, maxWidth: .infinity) .frame(minWidth: 0, maxWidth: .infinity)
}
.contentShape(Rectangle())
.background(
RoundedRectangle(cornerRadius: 10, style: .continuous)
.fill(moodTint == tint ? theme.currentTheme.bgColor : .clear)
.padding([.top, .bottom], -3)
)
.onTapGesture { .onTapGesture {
let impactMed = UIImpactFeedbackGenerator(style: .heavy) let impactMed = UIImpactFeedbackGenerator(style: .heavy)
impactMed.impactOccurred() impactMed.impactOccurred()
moodTint = tint moodTint = tint
} }
}
if tint.rawValue != (MoodTints.allCases.sorted(by: { $0.rawValue > $1.rawValue }).first?.rawValue) ?? 0 { if tint.rawValue != (MoodTints.allCases.sorted(by: { $0.rawValue > $1.rawValue }).first?.rawValue) ?? 0 {
Divider() Divider()
} }
@@ -249,6 +274,13 @@ struct CustomizeView: View {
} }
.frame(minWidth: 0, maxWidth: .infinity) .frame(minWidth: 0, maxWidth: .infinity)
.padding() .padding()
.contentShape(Rectangle())
.background(
RoundedRectangle(cornerRadius: 10, style: .continuous)
.fill(personalityPack == aPack ? theme.currentTheme.bgColor : .clear)
.padding(5)
)
.onTapGesture { .onTapGesture {
let impactMed = UIImpactFeedbackGenerator(style: .heavy) let impactMed = UIImpactFeedbackGenerator(style: .heavy)
impactMed.impactOccurred() impactMed.impactOccurred()