From 0c2f79f1b595a44e00d8d618876f840745269678 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 6 Apr 2021 17:31:42 -0400 Subject: [PATCH 1/3] Update read/unread swipe images to be SF Symbols on Big Sur --- Mac/AppAssets.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index deef57b28..e9a1ed05d 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -292,11 +292,23 @@ struct AppAssets { }() static var swipeMarkReadImage: RSImage = { - return RSImage(named: "swipeMarkRead")! + if #available(OSX 11.0, *) { + return RSImage(systemSymbolName: "circle", accessibilityDescription: "Mark Read")! + .withSymbolConfiguration(.init(scale: .large))! + } else { + // TODO: remove swipeMarkRead asset when dropping support for macOS 10.15 + return RSImage(named: "swipeMarkRead")! + } }() static var swipeMarkUnreadImage: RSImage = { - return RSImage(named: "swipeMarkUnread")! + if #available(OSX 11.0, *) { + return RSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: "Mark Unread")! + .withSymbolConfiguration(.init(scale: .large))! + } else { + // TODO: remove swipeMarkUnread asset when dropping support for macOS 10.15 + return RSImage(named: "swipeMarkUnread")! + } }() static var swipeMarkStarredImage: RSImage = { From 3609b6f977d1f440cac664641a43619d347750a9 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 6 Apr 2021 17:34:05 -0400 Subject: [PATCH 2/3] Add labels to swipe actions to match iOS --- Mac/MainWindow/Timeline/TimelineViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index a664ffc7a..470e8bcb6 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -941,7 +941,7 @@ extension TimelineViewController: NSTableViewDelegate { switch edge { case .leading: - let action = NSTableViewRowAction(style: .regular, title: "") { (action, row) in + let action = NSTableViewRowAction(style: .regular, title: article.status.read ? "Unread" : "Read") { (action, row) in self.toggleArticleRead(article); tableView.rowActionsVisible = false } @@ -949,7 +949,7 @@ extension TimelineViewController: NSTableViewDelegate { return [action] case .trailing: - let action = NSTableViewRowAction(style: .regular, title: "") { (action, row) in + let action = NSTableViewRowAction(style: .regular, title: article.status.starred ? "Unstar" : "Star") { (action, row) in self.toggleArticleStarred(article); tableView.rowActionsVisible = false } From 76cf335af15133b853daccf02a356261024eae5a Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 6 Apr 2021 17:37:15 -0400 Subject: [PATCH 3/3] Use the star SF Symbols as well --- Mac/AppAssets.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index e9a1ed05d..be4065a9f 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -312,11 +312,21 @@ struct AppAssets { }() static var swipeMarkStarredImage: RSImage = { - return RSImage(named: "swipeMarkStarred")! + if #available(OSX 11.0, *) { + return RSImage(systemSymbolName: "star.fill", accessibilityDescription: "Star")! + .withSymbolConfiguration(.init(scale: .large))! + } else { + return RSImage(named: "swipeMarkStarred")! + } }() static var swipeMarkUnstarredImage: RSImage = { - return RSImage(named: "swipeMarkUnstarred")! + if #available(OSX 11.0, *) { + return RSImage(systemSymbolName: "star", accessibilityDescription: "Unstar")! + .withSymbolConfiguration(.init(scale: .large))! + } else { + return RSImage(named: "swipeMarkUnstarred")! + } }() static var starColor: NSColor = {