From 39991d187c778bf843ad367d20c53cb50a8b9a0a Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sun, 22 Jun 2025 22:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Adds=20missing=20images=20for=20?= =?UTF-8?q?mark=20above/below=20as=20read?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mac/AppAssets.swift | 10 ++ ...melineViewController+ContextualMenus.swift | 4 +- .../markAboveAsRead.symbolset/Contents.json | 12 ++ .../markAsReadAbove.svg | 159 ++++++++++++++++++ .../markBelowAsRead.symbolset/Contents.json | 12 ++ .../markBelowAsRead.svg | 159 ++++++++++++++++++ 6 files changed, 354 insertions(+), 2 deletions(-) create mode 100644 Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json create mode 100644 Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg create mode 100644 Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json create mode 100644 Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index cefbe0423..eb7f24dbb 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -161,6 +161,16 @@ struct AppAssets { let image = RSImage(named: "markAllAsRead") return image! }() + + static var markBelowAsReadImage: RSImage = { + let image = RSImage(named: "markBelowAsRead") + return image! + }() + + static var markAboveAsReadImage: RSImage = { + let image = RSImage(named: "markAboveAsRead") + return image! + }() static var nextUnreadImage: RSImage = { diff --git a/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift b/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift index 32ce32ac0..843a32f79 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift @@ -241,11 +241,11 @@ private extension TimelineViewController { } func markAboveReadMenuItem(_ articles: [Article]) -> NSMenuItem { - return menuItem(NSLocalizedString("Mark Above as Read", comment: "Command"), #selector(markAboveArticlesReadFromContextualMenu(_:)), articles, image: nil) + return menuItem(NSLocalizedString("Mark Above as Read", comment: "Command"), #selector(markAboveArticlesReadFromContextualMenu(_:)), articles, image: AppAssets.markAboveAsReadImage) } func markBelowReadMenuItem(_ articles: [Article]) -> NSMenuItem { - return menuItem(NSLocalizedString("Mark Below as Read", comment: "Command"), #selector(markBelowArticlesReadFromContextualMenu(_:)), articles, image: nil) + return menuItem(NSLocalizedString("Mark Below as Read", comment: "Command"), #selector(markBelowArticlesReadFromContextualMenu(_:)), articles, image: AppAssets.markBelowAsReadImage) } func selectFeedInSidebarMenuItem(_ feed: WebFeed) -> NSMenuItem { diff --git a/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json new file mode 100644 index 000000000..a564ef15f --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "markAsReadAbove.svg", + "idiom" : "universal" + } + ] +} diff --git a/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg new file mode 100644 index 000000000..33ae08783 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg @@ -0,0 +1,159 @@ + + + markAsReadAbove + + + + + + + Weight/Scale Variations + + + Ultralight + + + Thin + + + Light + + + Regular + + + Medium + + + Semibold + + + Bold + + + Heavy + + + Black + + + + + + + + + + + + + Design Variations + + + Symbols are supported in up to nine weights and three scales. + + + For optimal layout with text and other symbols, vertically align + + + symbols with the adjacent text. + + + + + + + + Margins + + + Leading and trailing margins on the left and right side of each symbol + + + can be adjusted by modifying the width of the blue rectangles. + + + Modifications are automatically applied proportionally to all + + + scales and weights. + + + + + + Exporting + + + Symbols should be outlined when exporting to ensure the + + + design is preserved when submitting to Xcode. + + + Template v.1.0 + + + Generated from circle + + + Typeset at 100 points + + + Small + + + Medium + + + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json new file mode 100644 index 000000000..2a23fbc06 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "markBelowAsRead.svg", + "idiom" : "universal" + } + ] +} diff --git a/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg new file mode 100644 index 000000000..6edb2d188 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg @@ -0,0 +1,159 @@ + + + markBelowAsRead + + + + + + + Weight/Scale Variations + + + Ultralight + + + Thin + + + Light + + + Regular + + + Medium + + + Semibold + + + Bold + + + Heavy + + + Black + + + + + + + + + + + + + Design Variations + + + Symbols are supported in up to nine weights and three scales. + + + For optimal layout with text and other symbols, vertically align + + + symbols with the adjacent text. + + + + + + + + Margins + + + Leading and trailing margins on the left and right side of each symbol + + + can be adjusted by modifying the width of the blue rectangles. + + + Modifications are automatically applied proportionally to all + + + scales and weights. + + + + + + Exporting + + + Symbols should be outlined when exporting to ensure the + + + design is preserved when submitting to Xcode. + + + Template v.1.0 + + + Generated from circle + + + Typeset at 100 points + + + Small + + + Medium + + + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file