diff --git a/Mac/MainWindow/IconView.swift b/Mac/MainWindow/IconView.swift index e03ea6be4..55918692d 100644 --- a/Mac/MainWindow/IconView.swift +++ b/Mac/MainWindow/IconView.swift @@ -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) { diff --git a/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift b/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift index 7b021a073..883c859d7 100644 --- a/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift +++ b/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift @@ -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) } } diff --git a/Mac/MainWindow/Sidebar/Cell/SidebarCellLayout.swift b/Mac/MainWindow/Sidebar/Cell/SidebarCellLayout.swift index 90b2aba1f..e054b924a 100644 --- a/Mac/MainWindow/Sidebar/Cell/SidebarCellLayout.swift +++ b/Mac/MainWindow/Sidebar/Cell/SidebarCellLayout.swift @@ -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) diff --git a/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift b/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift index 2271a7a53..7e4726028 100644 --- a/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift +++ b/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift @@ -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) } } diff --git a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift index 3636e7670..663f9f6fe 100644 --- a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift +++ b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift @@ -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) }