AppAssets

This commit is contained in:
Stuart Breckenridge 2021-02-01 08:25:34 +08:00
parent e2c63174a5
commit 19ab74527b
No known key found for this signature in database
GPG Key ID: 1F11FD62007DC331
2 changed files with 17 additions and 7 deletions

View File

@ -157,6 +157,10 @@ struct AppAssets {
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
}()
static var masterFolderImageNonIcon: UIImage = {
return UIImage(systemName: "folder.fill")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var moreImage: UIImage = {
return UIImage(systemName: "ellipsis.circle")!
}()
@ -181,6 +185,10 @@ struct AppAssets {
return UIColor(named: "primaryAccentColor")!
}
static var redditOriginal: UIImage = {
return UIImage(named: "redditWhite")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var safariImage: UIImage = {
return UIImage(systemName: "safari")!
}()
@ -240,6 +248,10 @@ struct AppAssets {
return UIImage(systemName: "trash")!
}()
static var twitterOriginal: UIImage = {
return UIImage(named: "twitterWhite")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var unreadFeedImage: IconImage {
let image = UIImage(systemName: "largecircle.fill.circle")!
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
@ -253,6 +265,7 @@ struct AppAssets {
return UIColor(named: "controlBackgroundColor")!
}()
static func image(for accountType: AccountType) -> UIImage? {
switch accountType {
case .onMyMac:

View File

@ -585,25 +585,22 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
if #available(iOS 14.0, *) {
let addWebFeedActionTitle = NSLocalizedString("Add Web Feed", comment: "Add Web Feed")
let addWebFeedAction = UIAction(title: addWebFeedActionTitle, image: UIImage(named: "faviconTemplateImage")?.withRenderingMode(.alwaysOriginal).withTintColor(.gray)) { _ in
let addWebFeedAction = UIAction(title: addWebFeedActionTitle, image: AppAssets.faviconTemplateImage.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)) { _ in
self.coordinator.showAddWebFeed()
}
let addRedditFeedActionTitle = NSLocalizedString("Add Reddit Feed", comment: "Add Reddit Feed")
let redditImage = UIImage(named: "redditWhite")?.withRenderingMode(.alwaysOriginal).withTintColor(.gray)
let addRedditFeedAction = UIAction(title: addRedditFeedActionTitle, image: redditImage) { _ in
let addRedditFeedAction = UIAction(title: addRedditFeedActionTitle, image: AppAssets.redditOriginal) { _ in
self.coordinator.showAddRedditFeed()
}
let addTwitterFeedActionTitle = NSLocalizedString("Add Twitter Feed", comment: "Add Twitter Feed")
let addTwitterFeedAction = UIAction(title: addTwitterFeedActionTitle, image: UIImage(named: "twitterWhite")?.withRenderingMode(.alwaysOriginal).withTintColor(.gray)) { _ in
let addTwitterFeedAction = UIAction(title: addTwitterFeedActionTitle, image: AppAssets.twitterOriginal) { _ in
self.coordinator.showAddTwitterFeed()
}
let addWebFolderdActionTitle = NSLocalizedString("Add Folder", comment: "Add Folder")
let folderImage = UIImage(systemName: "folder.badge.plus",
withConfiguration: UIImage.SymbolConfiguration(pointSize: 16, weight: .black))?.withRenderingMode(.alwaysOriginal).withTintColor(.gray)
let addWebFolderAction = UIAction(title: addWebFolderdActionTitle, image: folderImage) { _ in
let addWebFolderAction = UIAction(title: addWebFolderdActionTitle, image: AppAssets.masterFolderImageNonIcon) { _ in
self.coordinator.showAddFolder()
}