mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Override textField and imageView didSet — their properties weren’t getting set in commonInit, because they weren’t set yet.
This commit is contained in:
@@ -90,13 +90,23 @@ class SidebarCell : NSTableCellView {
|
||||
override var isFlipped: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
override var textField: NSTextField? {
|
||||
didSet {
|
||||
textField?.translatesAutoresizingMaskIntoConstraints = false
|
||||
updateTextFieldIsEditable()
|
||||
}
|
||||
}
|
||||
|
||||
override var imageView: NSImageView? {
|
||||
didSet {
|
||||
imageView?.translatesAutoresizingMaskIntoConstraints = false
|
||||
}
|
||||
}
|
||||
|
||||
private func commonInit() {
|
||||
unreadCountView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView?.translatesAutoresizingMaskIntoConstraints = false
|
||||
textField?.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(unreadCountView)
|
||||
updateTextFieldIsEditable()
|
||||
}
|
||||
|
||||
override init(frame frameRect: NSRect) {
|
||||
|
||||
Reference in New Issue
Block a user