Merge branch 'ios-candidate' of https://github.com/Ranchero-Software/NetNewsWire into ios-candidate
This commit is contained in:
commit
3ba89926fc
|
@ -63,7 +63,7 @@ final class IconView: NSView {
|
|||
}
|
||||
|
||||
override func resizeSubviews(withOldSize oldSize: NSSize) {
|
||||
imageView.rs_setFrameIfNotEqual(rectForImageView())
|
||||
imageView.setFrame(ifNotEqualTo: rectForImageView())
|
||||
}
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
|
|
|
@ -142,9 +142,9 @@ private extension SidebarCell {
|
|||
}
|
||||
|
||||
func layoutWith(_ layout: SidebarCellLayout) {
|
||||
faviconImageView.rs_setFrameIfNotEqual(layout.faviconRect)
|
||||
titleView.rs_setFrameIfNotEqual(layout.titleRect)
|
||||
unreadCountView.rs_setFrameIfNotEqual(layout.unreadCountRect)
|
||||
faviconImageView.setFrame(ifNotEqualTo: layout.faviconRect)
|
||||
titleView.setFrame(ifNotEqualTo: layout.titleRect)
|
||||
unreadCountView.setFrame(ifNotEqualTo: layout.unreadCountRect)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ struct SidebarCellLayout {
|
|||
var rFavicon = NSRect.zero
|
||||
if shouldShowImage {
|
||||
rFavicon = NSRect(x: 0.0, y: 0.0, width: appearance.imageSize.width, height: appearance.imageSize.height)
|
||||
rFavicon = RSRectCenteredVerticallyInRect(rFavicon, bounds)
|
||||
rFavicon = rFavicon.centeredVertically(in: bounds)
|
||||
}
|
||||
self.faviconRect = rFavicon
|
||||
|
||||
|
@ -34,7 +34,7 @@ struct SidebarCellLayout {
|
|||
if shouldShowImage {
|
||||
rTextField.origin.x = NSMaxX(rFavicon) + appearance.imageMarginRight
|
||||
}
|
||||
rTextField = RSRectCenteredVerticallyInRect(rTextField, bounds)
|
||||
rTextField = rTextField.centeredVertically(in: bounds)
|
||||
|
||||
let unreadCountSize = unreadCountView.intrinsicContentSize
|
||||
let unreadCountIsHidden = unreadCountView.unreadCount < 1
|
||||
|
@ -43,7 +43,7 @@ struct SidebarCellLayout {
|
|||
if !unreadCountIsHidden {
|
||||
rUnread.size = unreadCountSize
|
||||
rUnread.origin.x = NSMaxX(bounds) - unreadCountSize.width
|
||||
rUnread = RSRectCenteredVerticallyInRect(rUnread, bounds)
|
||||
rUnread = rUnread.centeredVertically(in: bounds)
|
||||
let textFieldMaxX = NSMinX(rUnread) - appearance.unreadCountMarginLeft
|
||||
if NSMaxX(rTextField) > textFieldMaxX {
|
||||
rTextField.size.width = textFieldMaxX - NSMinX(rTextField)
|
||||
|
|
|
@ -116,12 +116,12 @@ class TimelineTableCellView: NSTableCellView {
|
|||
setFrame(for: summaryView, rect: layoutRects.summaryRect)
|
||||
setFrame(for: textView, rect: layoutRects.textRect)
|
||||
|
||||
dateView.rs_setFrameIfNotEqual(layoutRects.dateRect)
|
||||
unreadIndicatorView.rs_setFrameIfNotEqual(layoutRects.unreadIndicatorRect)
|
||||
feedNameView.rs_setFrameIfNotEqual(layoutRects.feedNameRect)
|
||||
iconView.rs_setFrameIfNotEqual(layoutRects.iconImageRect)
|
||||
starView.rs_setFrameIfNotEqual(layoutRects.starRect)
|
||||
separatorView.rs_setFrameIfNotEqual(layoutRects.separatorRect)
|
||||
dateView.setFrame(ifNotEqualTo: layoutRects.dateRect)
|
||||
unreadIndicatorView.setFrame(ifNotEqualTo: layoutRects.unreadIndicatorRect)
|
||||
feedNameView.setFrame(ifNotEqualTo: layoutRects.feedNameRect)
|
||||
iconView.setFrame(ifNotEqualTo: layoutRects.iconImageRect)
|
||||
starView.setFrame(ifNotEqualTo: layoutRects.starRect)
|
||||
separatorView.setFrame(ifNotEqualTo: layoutRects.separatorRect)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ private extension TimelineTableCellView {
|
|||
}
|
||||
else {
|
||||
showView(textField)
|
||||
textField.rs_setFrameIfNotEqual(rect)
|
||||
textField.setFrame(ifNotEqualTo: rect)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ private extension AccountsPreferencesViewController {
|
|||
addChild(controller)
|
||||
controller.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
detailView.addSubview(controller.view)
|
||||
detailView.rs_addFullSizeConstraints(forSubview: controller.view)
|
||||
detailView.addFullSizeConstraints(forSubview: controller.view)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue