mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-02 12:06:58 +01:00
AppAssets
This commit is contained in:
parent
e2c63174a5
commit
19ab74527b
@ -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:
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user