More tint color changes

This commit is contained in:
Arnfried Griesert
2023-03-06 22:11:23 +01:00
parent 9705d935c9
commit d5d299a357
45 changed files with 187 additions and 43 deletions
@@ -51,7 +51,11 @@ struct TimelinePollAnswerOptionButton: View {
VStack(alignment: .leading, spacing: 12.0) {
HStack(alignment: .top, spacing: 8.0) {
if !poll.closed {
Image(uiImage: answerOption.selected ? Asset.Images.pollCheckboxSelected.image : Asset.Images.pollCheckboxDefault.image)
if BWIBuildSettings.shared.bwiEnableBuMUI {
Image(uiImage: answerOption.selected ? Asset.Images.pollCheckboxSelectedBum.image : Asset.Images.pollCheckboxDefault.image)
} else {
Image(uiImage: answerOption.selected ? Asset.Images.pollCheckboxSelected.image : Asset.Images.pollCheckboxDefault.image)
}
}
Text(answerOption.text)
@@ -69,7 +73,7 @@ struct TimelinePollAnswerOptionButton: View {
if poll.shouldDiscloseResults {
Text(answerOption.count == 1 ? VectorL10n.pollTimelineOneVote : VectorL10n.pollTimelineVotesCount(Int(answerOption.count)))
.font(theme.fonts.footnote)
.foregroundColor(poll.closed && answerOption.winner ? theme.colors.accent : theme.colors.secondaryContent)
.foregroundColor(poll.closed && answerOption.winner ? Color(ThemeService.shared().theme.tintColor) : theme.colors.secondaryContent)
.accessibilityIdentifier("PollAnswerOption\(optionIndex)Count")
}
}
@@ -89,15 +93,15 @@ struct TimelinePollAnswerOptionButton: View {
return (answerOption.winner ? Color(ThemeService.shared().theme.tintColor) : theme.colors.quinaryContent)
}
return answerOption.selected ? theme.colors.accent : theme.colors.quinaryContent
return answerOption.selected ? Color(ThemeService.shared().theme.tintColor) : theme.colors.quinaryContent
}
var progressViewAccentColor: Color {
guard !poll.closed else {
return (answerOption.winner ? theme.colors.accent : theme.colors.quarterlyContent)
return (answerOption.winner ? Color(ThemeService.shared().theme.tintColor) : theme.colors.quarterlyContent)
}
return answerOption.selected ? theme.colors.accent : theme.colors.quarterlyContent
return answerOption.selected ? Color(ThemeService.shared().theme.tintColor) : theme.colors.quarterlyContent
}
var optionIndex: Int {