From c0f76d0dbbf3d52571da8dd451a571d70d43de85 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 6 Jan 2020 18:07:04 -0700 Subject: [PATCH] Change Mark All as Read icon. Issue #1526 --- iOS/AppAssets.swift | 4 +- iOS/Base.lproj/Main.storyboard | 4 +- iOS/MasterFeed/MasterFeedViewController.swift | 2 +- .../MasterTimelineViewController.swift | 2 +- .../markAllAsRead.symbolset/Contents.json | 12 ++ .../markAllAsRead.symbolset/markAllAsRead.svg | 142 ++++++++++++++++++ 6 files changed, 160 insertions(+), 6 deletions(-) create mode 100644 iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/Contents.json create mode 100644 iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index 5d7749b09..6a97cef28 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -113,8 +113,8 @@ struct AppAssets { UIImage(systemName: "info.circle")! }() - static var markAllInFeedAsReadImage: UIImage = { - return UIImage(systemName: "asterisk.circle")! + static var markAllAsReadImage: UIImage = { + return UIImage(named: "markAllAsRead")! }() static var markBelowAsReadImage: UIImage = { diff --git a/iOS/Base.lproj/Main.storyboard b/iOS/Base.lproj/Main.storyboard index e579a5ab0..e49f78bd6 100644 --- a/iOS/Base.lproj/Main.storyboard +++ b/iOS/Base.lproj/Main.storyboard @@ -119,7 +119,7 @@ - + @@ -367,13 +367,13 @@ - + diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 33702af2a..9987eef5d 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -1101,7 +1101,7 @@ private extension MasterFeedViewController { let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command") let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, nameForDisplay) as String - let action = UIAction(title: title, image: AppAssets.markAllInFeedAsReadImage) { [weak self] action in + let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in self?.coordinator.markAllAsRead(articles) } diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index f6584928c..45d327c07 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -767,7 +767,7 @@ private extension MasterTimelineViewController { let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command") let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, webFeed.nameForDisplay) as String - let action = UIAction(title: title, image: AppAssets.markAllInFeedAsReadImage) { [weak self] action in + let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in self?.coordinator.markAllAsRead(articles) } return action diff --git a/iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/Contents.json b/iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/Contents.json new file mode 100644 index 000000000..a83100300 --- /dev/null +++ b/iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "symbols" : [ + { + "idiom" : "universal", + "filename" : "markAllAsRead.svg" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg b/iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg new file mode 100644 index 000000000..58170a6ba --- /dev/null +++ b/iOS/Resources/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg @@ -0,0 +1,142 @@ + + + + Untitled + Created with Sketch. + + + + + + + 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