fix: poll option view using wrong dark mode background color issue
This commit is contained in:
parent
5d6004c3dc
commit
d23eaf3dd7
|
@ -82,7 +82,7 @@ final class PollOptionView: UIView {
|
|||
extension PollOptionView {
|
||||
private func _init() {
|
||||
// default color in the timeline
|
||||
roundedBackgroundView.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
roundedBackgroundView.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
|
||||
roundedBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(roundedBackgroundView)
|
||||
|
@ -193,6 +193,11 @@ struct PollOptionView_Previews: PreviewProvider {
|
|||
PollOptionView()
|
||||
}
|
||||
.previewLayout(.fixed(width: 375, height: 100))
|
||||
UIViewPreview(width: 375) {
|
||||
PollOptionView()
|
||||
}
|
||||
.preferredColorScheme(.dark)
|
||||
.previewLayout(.fixed(width: 375, height: 100))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -129,14 +129,16 @@ struct PollTableViewCell_Previews: PreviewProvider {
|
|||
}
|
||||
.previewLayout(.fixed(width: 375, height: 44 + 10))
|
||||
}
|
||||
.background(Color(.systemBackground))
|
||||
}
|
||||
|
||||
static var previews: some View {
|
||||
Group {
|
||||
controls.colorScheme(.light)
|
||||
controls.colorScheme(.dark)
|
||||
controls
|
||||
.colorScheme(.light)
|
||||
controls
|
||||
.colorScheme(.dark)
|
||||
}
|
||||
.background(Color.gray)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue