Update to latest RSCore

This commit is contained in:
Nate Weaver 2020-01-08 23:40:21 -06:00
parent e99e4362ff
commit 6dc442c264
6 changed files with 16 additions and 16 deletions

View File

@ -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) {

View File

@ -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)
}
}

View File

@ -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)

View File

@ -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)
}
}

View File

@ -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)
}

@ -1 +1 @@
Subproject commit f1cf21a26918bb36440dd4c12691f8362e977e3d
Subproject commit 2d7a8d459595772d367d6b4f7ff868e2723076bb