feat: ignore smart invert for photos
This commit is contained in:
parent
b63ae6800b
commit
4901b50d3b
|
@ -47,6 +47,10 @@ extension AvatarConfigurableView {
|
||||||
configurableAvatarButton?.layer.cornerRadius = 0
|
configurableAvatarButton?.layer.cornerRadius = 0
|
||||||
configurableAvatarButton?.layer.cornerCurve = .circular
|
configurableAvatarButton?.layer.cornerCurve = .circular
|
||||||
|
|
||||||
|
// accessibility
|
||||||
|
configurableAvatarImageView?.accessibilityIgnoresInvertColors = true
|
||||||
|
configurableAvatarButton?.accessibilityIgnoresInvertColors = true
|
||||||
|
|
||||||
defer {
|
defer {
|
||||||
avatarConfigurableView(self, didFinishConfiguration: configuration)
|
avatarConfigurableView(self, didFinishConfiguration: configuration)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@ final class MediaPreviewImageView: UIScrollView {
|
||||||
imageView.contentMode = .scaleAspectFit
|
imageView.contentMode = .scaleAspectFit
|
||||||
imageView.clipsToBounds = true
|
imageView.clipsToBounds = true
|
||||||
imageView.isUserInteractionEnabled = true
|
imageView.isUserInteractionEnabled = true
|
||||||
|
// accessibility
|
||||||
|
imageView.accessibilityIgnoresInvertColors = true
|
||||||
return imageView
|
return imageView
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,8 @@ final class ProfileHeaderView: UIView {
|
||||||
imageView.backgroundColor = ProfileHeaderView.bannerImageViewPlaceholderColor
|
imageView.backgroundColor = ProfileHeaderView.bannerImageViewPlaceholderColor
|
||||||
imageView.layer.masksToBounds = true
|
imageView.layer.masksToBounds = true
|
||||||
imageView.isUserInteractionEnabled = true
|
imageView.isUserInteractionEnabled = true
|
||||||
// #if DEBUG
|
// accessibility
|
||||||
// imageView.image = .placeholder(color: .red)
|
imageView.accessibilityIgnoresInvertColors = true
|
||||||
// #endif
|
|
||||||
return imageView
|
return imageView
|
||||||
}()
|
}()
|
||||||
let bannerImageViewOverlayView: UIView = {
|
let bannerImageViewOverlayView: UIView = {
|
||||||
|
|
|
@ -15,6 +15,8 @@ protocol SettingsAppearanceTableViewCellDelegate: class {
|
||||||
class AppearanceView: UIView {
|
class AppearanceView: UIView {
|
||||||
lazy var imageView: UIImageView = {
|
lazy var imageView: UIImageView = {
|
||||||
let view = UIImageView()
|
let view = UIImageView()
|
||||||
|
// accessibility
|
||||||
|
view.accessibilityIgnoresInvertColors = true
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
lazy var titleLabel: UILabel = {
|
lazy var titleLabel: UILabel = {
|
||||||
|
|
|
@ -65,6 +65,9 @@ extension MosaicImageViewContainer: ContentWarningOverlayViewDelegate {
|
||||||
extension MosaicImageViewContainer {
|
extension MosaicImageViewContainer {
|
||||||
|
|
||||||
private func _init() {
|
private func _init() {
|
||||||
|
// accessibility
|
||||||
|
accessibilityIgnoresInvertColors = true
|
||||||
|
|
||||||
container.translatesAutoresizingMaskIntoConstraints = false
|
container.translatesAutoresizingMaskIntoConstraints = false
|
||||||
container.axis = .horizontal
|
container.axis = .horizontal
|
||||||
container.distribution = .fillEqually
|
container.distribution = .fillEqually
|
||||||
|
|
|
@ -46,6 +46,9 @@ final class PlayerContainerView: UIView {
|
||||||
|
|
||||||
extension PlayerContainerView {
|
extension PlayerContainerView {
|
||||||
private func _init() {
|
private func _init() {
|
||||||
|
// accessibility
|
||||||
|
accessibilityIgnoresInvertColors = true
|
||||||
|
|
||||||
container.translatesAutoresizingMaskIntoConstraints = false
|
container.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(container)
|
addSubview(container)
|
||||||
containerHeightLayoutConstraint = container.heightAnchor.constraint(equalToConstant: 162).priority(.required - 1)
|
containerHeightLayoutConstraint = container.heightAnchor.constraint(equalToConstant: 162).priority(.required - 1)
|
||||||
|
|
|
@ -73,6 +73,8 @@ extension MediaHostToMediaPreviewViewControllerAnimatedTransitioning {
|
||||||
imageView.contentMode = .scaleAspectFill
|
imageView.contentMode = .scaleAspectFill
|
||||||
imageView.isUserInteractionEnabled = false
|
imageView.isUserInteractionEnabled = false
|
||||||
imageView.image = transitionItem.image
|
imageView.image = transitionItem.image
|
||||||
|
// accessibility
|
||||||
|
imageView.accessibilityIgnoresInvertColors = true
|
||||||
return imageView
|
return imageView
|
||||||
}()
|
}()
|
||||||
transitionItem.targetFrame = transitionTargetFrame
|
transitionItem.targetFrame = transitionTargetFrame
|
||||||
|
|
Loading…
Reference in New Issue