fix: content warning overlay layout issue
This commit is contained in:
parent
2a18244d84
commit
1424d07e1d
|
@ -340,9 +340,10 @@ extension StatusView {
|
||||||
contentWarningOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
contentWarningOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
containerStackView.addSubview(contentWarningOverlayView)
|
containerStackView.addSubview(contentWarningOverlayView)
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
statusContainerStackView.topAnchor.constraint(equalTo: contentWarningOverlayView.topAnchor, constant: StatusView.contentWarningBlurRadius).priority(.defaultLow),
|
statusContainerStackView.topAnchor.constraint(equalTo: contentWarningOverlayView.topAnchor, constant: StatusView.contentWarningBlurRadius).priority(.defaultHigh),
|
||||||
statusContainerStackView.leftAnchor.constraint(equalTo: contentWarningOverlayView.leftAnchor, constant: StatusView.contentWarningBlurRadius).priority(.defaultLow),
|
statusContainerStackView.leftAnchor.constraint(equalTo: contentWarningOverlayView.leftAnchor, constant: StatusView.contentWarningBlurRadius).priority(.defaultHigh),
|
||||||
// only layout to top-left corner and draw image to fit size
|
contentWarningOverlayView.rightAnchor.constraint(equalTo: statusContainerStackView.rightAnchor, constant: StatusView.contentWarningBlurRadius).priority(.defaultHigh),
|
||||||
|
// only layout to top and left & right then draw image to fit size
|
||||||
])
|
])
|
||||||
// avoid overlay clip author view
|
// avoid overlay clip author view
|
||||||
containerStackView.bringSubviewToFront(authorContainerStackView)
|
containerStackView.bringSubviewToFront(authorContainerStackView)
|
||||||
|
|
Loading…
Reference in New Issue