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 {
|
extension PollOptionView {
|
||||||
private func _init() {
|
private func _init() {
|
||||||
// default color in the timeline
|
// default color in the timeline
|
||||||
roundedBackgroundView.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
roundedBackgroundView.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||||
|
|
||||||
roundedBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
roundedBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(roundedBackgroundView)
|
addSubview(roundedBackgroundView)
|
||||||
|
@ -193,6 +193,11 @@ struct PollOptionView_Previews: PreviewProvider {
|
||||||
PollOptionView()
|
PollOptionView()
|
||||||
}
|
}
|
||||||
.previewLayout(.fixed(width: 375, height: 100))
|
.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))
|
.previewLayout(.fixed(width: 375, height: 44 + 10))
|
||||||
}
|
}
|
||||||
|
.background(Color(.systemBackground))
|
||||||
}
|
}
|
||||||
|
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
Group {
|
Group {
|
||||||
controls.colorScheme(.light)
|
controls
|
||||||
controls.colorScheme(.dark)
|
.colorScheme(.light)
|
||||||
|
controls
|
||||||
|
.colorScheme(.dark)
|
||||||
}
|
}
|
||||||
.background(Color.gray)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue