mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix avatar background composition
This commit is contained in:
@@ -15,7 +15,6 @@ final class MasterTimelineAvatarView: UIView {
|
||||
if image !== oldValue {
|
||||
imageView.image = image
|
||||
setNeedsLayout()
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,21 +45,17 @@ final class MasterTimelineAvatarView: UIView {
|
||||
|
||||
override func didMoveToSuperview() {
|
||||
setNeedsLayout()
|
||||
setNeedsDisplay()
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
imageView.setFrameIfNotEqual(rectForImageView())
|
||||
if hasExposedVerticalBackground {
|
||||
backgroundColor = AppAssets.avatarBackgroundColor
|
||||
} else {
|
||||
backgroundColor = nil
|
||||
}
|
||||
}
|
||||
|
||||
override func draw(_ dirtyRect: CGRect) {
|
||||
if hasExposedVerticalBackground {
|
||||
AppAssets.avatarBackgroundColor.set()
|
||||
} else {
|
||||
UIColor.systemBackground.set()
|
||||
}
|
||||
UIRectFill(dirtyRect)
|
||||
}
|
||||
}
|
||||
|
||||
private extension MasterTimelineAvatarView {
|
||||
|
||||
Reference in New Issue
Block a user