Finish migration away from AppAssets to AppImage and AppColor.
This commit is contained in:
parent
6db201f827
commit
0dfb284f67
@ -1,285 +0,0 @@
|
|||||||
//
|
|
||||||
// AppAssets.swift
|
|
||||||
// NetNewsWire
|
|
||||||
//
|
|
||||||
// Created by Brent Simmons on 2/17/18.
|
|
||||||
// Copyright © 2018 Ranchero Software. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import AppKit
|
|
||||||
import RSCore
|
|
||||||
import Account
|
|
||||||
|
|
||||||
struct AppAssets {
|
|
||||||
|
|
||||||
// static var accountBazQux: RSImage! = {
|
|
||||||
// return RSImage(named: "accountBazQux")
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var accountCloudKit: RSImage! = {
|
|
||||||
// return RSImage(named: "accountCloudKit")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountFeedbin: RSImage! = {
|
|
||||||
// return RSImage(named: "accountFeedbin")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountFeedly: RSImage! = {
|
|
||||||
// return RSImage(named: "accountFeedly")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountFreshRSS: RSImage! = {
|
|
||||||
// return RSImage(named: "accountFreshRSS")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountInoreader: RSImage! = {
|
|
||||||
// return RSImage(named: "accountInoreader")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountLocal: RSImage! = {
|
|
||||||
// return RSImage(named: "accountLocal")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountNewsBlur: RSImage! = {
|
|
||||||
// return RSImage(named: "accountNewsBlur")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountTheOldReader: RSImage! = {
|
|
||||||
// return RSImage(named: "accountTheOldReader")
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
|
|
||||||
|
|
||||||
@available(macOS 11.0, *)
|
|
||||||
static var addNewSidebarItemImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "plus", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var articleExtractorError: RSImage = {
|
|
||||||
// return RSImage(named: "articleExtractorError")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOff: RSImage = {
|
|
||||||
// return RSImage(named: "articleExtractorOff")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOn: RSImage = {
|
|
||||||
// return RSImage(named: "articleExtractorOn")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var articleTheme: RSImage = {
|
|
||||||
// return NSImage(systemSymbolName: "doc.richtext", accessibilityDescription: nil)!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var cleanUpImage: RSImage = {
|
|
||||||
// return NSImage(systemSymbolName: "wind", accessibilityDescription: nil)!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var marsEditIcon: RSImage = {
|
|
||||||
// return RSImage(named: "MarsEditIcon")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var microblogIcon: RSImage = {
|
|
||||||
// return RSImage(named: "MicroblogIcon")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var faviconTemplateImage: RSImage = {
|
|
||||||
// return RSImage(named: "faviconTemplateImage")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var filterActive: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "line.horizontal.3.decrease.circle.fill", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var filterInactive: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "line.horizontal.3.decrease.circle", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var iconLightBackgroundColor: NSColor = {
|
|
||||||
// return NSColor(named: NSColor.Name("iconLightBackgroundColor"))!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var iconDarkBackgroundColor: NSColor = {
|
|
||||||
// return NSColor(named: NSColor.Name("iconDarkBackgroundColor"))!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var legacyArticleExtractor: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractor")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorError: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorError")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorInactiveDark: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorInactiveDark")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorInactiveLight: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorInactiveLight")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorProgress1: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorProgress1")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorProgress2: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorProgress2")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorProgress3: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorProgress3")
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var legacyArticleExtractorProgress4: RSImage! = {
|
|
||||||
// return RSImage(named: "legacyArticleExtractorProgress4")
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var folderImage: IconImage {
|
|
||||||
let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)!
|
|
||||||
let preferredColor = NSColor(named: "AccentColor")!
|
|
||||||
let coloredImage = image.tinted(with: preferredColor)
|
|
||||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
|
||||||
}
|
|
||||||
|
|
||||||
// static var markAllAsReadImage: RSImage = {
|
|
||||||
// return RSImage(named: "markAllAsRead")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var nextUnreadImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "chevron.down.circle", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var openInBrowserImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "safari", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var preferencesToolbarAccountsImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "at", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var preferencesToolbarExtensionsImage: RSImage = {
|
|
||||||
return RSImage(named: "preferencesToolbarExtensions")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var preferencesToolbarGeneralImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "gearshape", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var preferencesToolbarAdvancedImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "gearshape.2", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var readClosedImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var readOpenImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "circle", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var refreshImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "arrow.clockwise", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var searchFeedImage: IconImage = {
|
|
||||||
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSuppressed: true)
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var shareImage: RSImage = {
|
|
||||||
// return NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var sidebarToggleImage: RSImage = {
|
|
||||||
// return NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var starClosedImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var starOpenImage: RSImage = {
|
|
||||||
return NSImage(systemSymbolName: "star", accessibilityDescription: nil)!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var starredFeedImage: IconImage = {
|
|
||||||
let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
|
|
||||||
let preferredColor = NSColor(named: "StarColor")!
|
|
||||||
let coloredImage = image.tinted(with: preferredColor)
|
|
||||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var timelineSeparatorColor: NSColor = {
|
|
||||||
// return NSColor(named: "timelineSeparatorColor")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
static var timelineStarSelected: RSImage! = {
|
|
||||||
return RSImage(named: "timelineStar")?.tinted(with: .white)
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var timelineStarUnselected: RSImage! = {
|
|
||||||
return RSImage(named: "timelineStar")?.tinted(with: starColor)
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var todayFeedImage: IconImage = {
|
|
||||||
let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!
|
|
||||||
let preferredColor = NSColor.orange
|
|
||||||
let coloredImage = image.tinted(with: preferredColor)
|
|
||||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var unreadFeedImage: IconImage = {
|
|
||||||
let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
|
|
||||||
let preferredColor = NSColor(named: "AccentColor")!
|
|
||||||
let coloredImage = image.tinted(with: preferredColor)
|
|
||||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var swipeMarkReadImage: RSImage = {
|
|
||||||
return RSImage(systemSymbolName: "circle", accessibilityDescription: "Mark Read")!
|
|
||||||
.withSymbolConfiguration(.init(scale: .large))!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var swipeMarkUnreadImage: RSImage = {
|
|
||||||
return RSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: "Mark Unread")!
|
|
||||||
.withSymbolConfiguration(.init(scale: .large))!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var swipeMarkStarredImage: RSImage = {
|
|
||||||
return RSImage(systemSymbolName: "star.fill", accessibilityDescription: "Star")!
|
|
||||||
.withSymbolConfiguration(.init(scale: .large))!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var swipeMarkUnstarredImage: RSImage = {
|
|
||||||
return RSImage(systemSymbolName: "star", accessibilityDescription: "Unstar")!
|
|
||||||
.withSymbolConfiguration(.init(scale: .large))!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var starColor: NSColor = {
|
|
||||||
return NSColor(named: NSColor.Name("StarColor"))!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static func image(for accountType: AccountType) -> NSImage? {
|
|
||||||
// switch accountType {
|
|
||||||
// case .onMyMac:
|
|
||||||
// return AppAssets.accountLocal
|
|
||||||
// case .cloudKit:
|
|
||||||
// return AppAssets.accountCloudKit
|
|
||||||
// case .bazQux:
|
|
||||||
// return AppAsset.accountBazQuxImage
|
|
||||||
// case .feedbin:
|
|
||||||
// return AppAssets.accountFeedbin
|
|
||||||
// case .feedly:
|
|
||||||
// return AppAssets.accountFeedly
|
|
||||||
// case .freshRSS:
|
|
||||||
// return AppAssets.accountFreshRSS
|
|
||||||
// case .inoreader:
|
|
||||||
// return AppAssets.accountInoreader
|
|
||||||
// case .newsBlur:
|
|
||||||
// return AppAssets.accountNewsBlur
|
|
||||||
// case .theOldReader:
|
|
||||||
// return AppAssets.accountTheOldReader
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
@ -753,11 +753,11 @@ extension MainWindowController: NSToolbarDelegate {
|
|||||||
|
|
||||||
case .refresh:
|
case .refresh:
|
||||||
let title = NSLocalizedString("Refresh", comment: "Refresh")
|
let title = NSLocalizedString("Refresh", comment: "Refresh")
|
||||||
return buildToolbarButton(.refresh, title, AppAssets.refreshImage, "refreshAll:")
|
return buildToolbarButton(.refresh, title, AppImage.refresh, "refreshAll:")
|
||||||
|
|
||||||
case .newSidebarItemMenu:
|
case .newSidebarItemMenu:
|
||||||
let toolbarItem = NSMenuToolbarItem(itemIdentifier: .newSidebarItemMenu)
|
let toolbarItem = NSMenuToolbarItem(itemIdentifier: .newSidebarItemMenu)
|
||||||
toolbarItem.image = AppAssets.addNewSidebarItemImage
|
toolbarItem.image = AppImage.addNewSidebarItem
|
||||||
let description = NSLocalizedString("Add Item", comment: "Add Item")
|
let description = NSLocalizedString("Add Item", comment: "Add Item")
|
||||||
toolbarItem.toolTip = description
|
toolbarItem.toolTip = description
|
||||||
toolbarItem.label = description
|
toolbarItem.label = description
|
||||||
@ -770,22 +770,22 @@ extension MainWindowController: NSToolbarDelegate {
|
|||||||
|
|
||||||
case .toggleReadArticlesFilter:
|
case .toggleReadArticlesFilter:
|
||||||
let title = NSLocalizedString("Read Articles Filter", comment: "Read Articles Filter")
|
let title = NSLocalizedString("Read Articles Filter", comment: "Read Articles Filter")
|
||||||
return buildToolbarButton(.toggleReadArticlesFilter, title, AppAssets.filterInactive, "toggleReadArticlesFilter:")
|
return buildToolbarButton(.toggleReadArticlesFilter, title, AppImage.filterInactive, "toggleReadArticlesFilter:")
|
||||||
|
|
||||||
case .timelineTrackingSeparator:
|
case .timelineTrackingSeparator:
|
||||||
return NSTrackingSeparatorToolbarItem(identifier: .timelineTrackingSeparator, splitView: splitViewController!.splitView, dividerIndex: 1)
|
return NSTrackingSeparatorToolbarItem(identifier: .timelineTrackingSeparator, splitView: splitViewController!.splitView, dividerIndex: 1)
|
||||||
|
|
||||||
case .markRead:
|
case .markRead:
|
||||||
let title = NSLocalizedString("Mark Read", comment: "Mark Read")
|
let title = NSLocalizedString("Mark Read", comment: "Mark Read")
|
||||||
return buildToolbarButton(.markRead, title, AppAssets.readClosedImage, "toggleRead:")
|
return buildToolbarButton(.markRead, title, AppImage.readClosed, "toggleRead:")
|
||||||
|
|
||||||
case .markStar:
|
case .markStar:
|
||||||
let title = NSLocalizedString("Star", comment: "Star")
|
let title = NSLocalizedString("Star", comment: "Star")
|
||||||
return buildToolbarButton(.markStar, title, AppAssets.starOpenImage, "toggleStarred:")
|
return buildToolbarButton(.markStar, title, AppImage.starOpen, "toggleStarred:")
|
||||||
|
|
||||||
case .nextUnread:
|
case .nextUnread:
|
||||||
let title = NSLocalizedString("Next Unread", comment: "Next Unread")
|
let title = NSLocalizedString("Next Unread", comment: "Next Unread")
|
||||||
return buildToolbarButton(.nextUnread, title, AppAssets.nextUnreadImage, "nextUnread:")
|
return buildToolbarButton(.nextUnread, title, AppImage.nextUnread, "nextUnread:")
|
||||||
|
|
||||||
case .readerView:
|
case .readerView:
|
||||||
let toolbarItem = RSToolbarItem(itemIdentifier: .readerView)
|
let toolbarItem = RSToolbarItem(itemIdentifier: .readerView)
|
||||||
@ -804,7 +804,7 @@ extension MainWindowController: NSToolbarDelegate {
|
|||||||
|
|
||||||
case .openInBrowser:
|
case .openInBrowser:
|
||||||
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||||
return buildToolbarButton(.openInBrowser, title, AppAssets.openInBrowserImage, "openArticleInBrowser:")
|
return buildToolbarButton(.openInBrowser, title, AppImage.openInBrowser, "openArticleInBrowser:")
|
||||||
|
|
||||||
case .articleThemeMenu:
|
case .articleThemeMenu:
|
||||||
articleThemeMenuToolbarItem.image = AppImage.articleTheme
|
articleThemeMenuToolbarItem.image = AppImage.articleTheme
|
||||||
@ -1033,7 +1033,7 @@ private extension MainWindowController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||||
button.image = markingRead ? AppAssets.readClosedImage : AppAssets.readOpenImage
|
button.image = markingRead ? AppImage.readClosed : AppImage.readOpen
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@ -1117,7 +1117,7 @@ private extension MainWindowController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||||
button.image = starring ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
button.image = starring ? AppImage.starOpen : AppImage.starClosed
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@ -1144,7 +1144,7 @@ private extension MainWindowController {
|
|||||||
(item as? NSMenuItem)?.title = hideCommand
|
(item as? NSMenuItem)?.title = hideCommand
|
||||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||||
toolbarItem.toolTip = hideCommand
|
toolbarItem.toolTip = hideCommand
|
||||||
button.image = AppAssets.filterInactive
|
button.image = AppImage.filterInactive
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -1153,13 +1153,13 @@ private extension MainWindowController {
|
|||||||
(item as? NSMenuItem)?.title = showCommand
|
(item as? NSMenuItem)?.title = showCommand
|
||||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||||
toolbarItem.toolTip = showCommand
|
toolbarItem.toolTip = showCommand
|
||||||
button.image = AppAssets.filterActive
|
button.image = AppImage.filterActive
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(item as? NSMenuItem)?.title = hideCommand
|
(item as? NSMenuItem)?.title = hideCommand
|
||||||
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
if let toolbarItem = item as? NSToolbarItem, let button = toolbarItem.view as? NSButton {
|
||||||
toolbarItem.toolTip = hideCommand
|
toolbarItem.toolTip = hideCommand
|
||||||
button.image = AppAssets.filterInactive
|
button.image = AppImage.filterInactive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ final class TimelineTableCellView: NSTableCellView {
|
|||||||
|
|
||||||
private lazy var iconView = IconView()
|
private lazy var iconView = IconView()
|
||||||
|
|
||||||
private var starView = TimelineTableCellView.imageView(with: AppAssets.timelineStarUnselected, scaling: .scaleNone)
|
private var starView = TimelineTableCellView.imageView(with: AppImage.timelineStarUnselected, scaling: .scaleNone)
|
||||||
|
|
||||||
private lazy var textFields = {
|
private lazy var textFields = {
|
||||||
return [self.dateView, self.feedNameView, self.titleView, self.summaryView, self.textView]
|
return [self.dateView, self.feedNameView, self.titleView, self.summaryView, self.textView]
|
||||||
@ -258,9 +258,9 @@ private extension TimelineTableCellView {
|
|||||||
|
|
||||||
func updateStarView() {
|
func updateStarView() {
|
||||||
if isSelected && isEmphasized {
|
if isSelected && isEmphasized {
|
||||||
starView.image = AppAssets.timelineStarSelected
|
starView.image = AppImage.timelineStarSelected
|
||||||
} else {
|
} else {
|
||||||
starView.image = AppAssets.timelineStarUnselected
|
starView.image = AppImage.timelineStarUnselected
|
||||||
}
|
}
|
||||||
showOrHideView(starView, !cellData.starred)
|
showOrHideView(starView, !cellData.starred)
|
||||||
}
|
}
|
||||||
|
@ -209,9 +209,9 @@ private extension TimelineContainerViewController {
|
|||||||
readFilteredButton.isHidden = false
|
readFilteredButton.isHidden = false
|
||||||
|
|
||||||
if isReadFiltered {
|
if isReadFiltered {
|
||||||
readFilteredButton.image = AppAssets.filterActive
|
readFilteredButton.image = AppImage.filterActive
|
||||||
} else {
|
} else {
|
||||||
readFilteredButton.image = AppAssets.filterInactive
|
readFilteredButton.image = AppImage.filterInactive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -915,7 +915,7 @@ extension TimelineViewController: NSTableViewDelegate {
|
|||||||
self.toggleArticleRead(article)
|
self.toggleArticleRead(article)
|
||||||
tableView.rowActionsVisible = false
|
tableView.rowActionsVisible = false
|
||||||
}
|
}
|
||||||
action.image = article.status.read ? AppAssets.swipeMarkUnreadImage : AppAssets.swipeMarkReadImage
|
action.image = article.status.read ? AppImage.swipeMarkUnread : AppImage.swipeMarkRead
|
||||||
return [action]
|
return [action]
|
||||||
|
|
||||||
case .trailing:
|
case .trailing:
|
||||||
@ -923,8 +923,8 @@ extension TimelineViewController: NSTableViewDelegate {
|
|||||||
self.toggleArticleStarred(article)
|
self.toggleArticleStarred(article)
|
||||||
tableView.rowActionsVisible = false
|
tableView.rowActionsVisible = false
|
||||||
}
|
}
|
||||||
action.backgroundColor = AppAssets.starColor
|
action.backgroundColor = AppColor.star
|
||||||
action.image = article.status.starred ? AppAssets.swipeMarkUnstarredImage : AppAssets.swipeMarkStarredImage
|
action.image = article.status.starred ? AppImage.swipeMarkUnstarred: AppImage.swipeMarkStarred
|
||||||
return [action]
|
return [action]
|
||||||
|
|
||||||
@unknown default:
|
@unknown default:
|
||||||
|
@ -35,13 +35,13 @@ final class PreferencesWindowController: NSWindowController, NSToolbarDelegate {
|
|||||||
var specs = [PreferencesToolbarItemSpec]()
|
var specs = [PreferencesToolbarItemSpec]()
|
||||||
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.General,
|
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.General,
|
||||||
name: NSLocalizedString("General", comment: "Preferences"),
|
name: NSLocalizedString("General", comment: "Preferences"),
|
||||||
image: AppAssets.preferencesToolbarGeneralImage)]
|
image: AppImage.preferencesToolbarGeneral)]
|
||||||
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.Accounts,
|
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.Accounts,
|
||||||
name: NSLocalizedString("Accounts", comment: "Preferences"),
|
name: NSLocalizedString("Accounts", comment: "Preferences"),
|
||||||
image: AppAssets.preferencesToolbarAccountsImage)]
|
image: AppImage.preferencesToolbarAccounts)]
|
||||||
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.Advanced,
|
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.Advanced,
|
||||||
name: NSLocalizedString("Advanced", comment: "Preferences"),
|
name: NSLocalizedString("Advanced", comment: "Preferences"),
|
||||||
image: AppAssets.preferencesToolbarAdvancedImage)]
|
image: AppImage.preferencesToolbarAdvanced)]
|
||||||
return specs
|
return specs
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -308,7 +308,6 @@
|
|||||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||||
membershipExceptions = (
|
membershipExceptions = (
|
||||||
/Localized/ShareExtension/MainInterface.storyboard,
|
/Localized/ShareExtension/MainInterface.storyboard,
|
||||||
AppAssets.swift,
|
|
||||||
Resources/Assets.xcassets,
|
Resources/Assets.xcassets,
|
||||||
ShareExtension/ShareFolderPickerAccountCell.xib,
|
ShareExtension/ShareFolderPickerAccountCell.xib,
|
||||||
ShareExtension/ShareFolderPickerCell.swift,
|
ShareExtension/ShareFolderPickerCell.swift,
|
||||||
@ -421,6 +420,7 @@
|
|||||||
84C1ECED2CDFE49100C7456A /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
|
84C1ECED2CDFE49100C7456A /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
|
||||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||||
membershipExceptions = (
|
membershipExceptions = (
|
||||||
|
AppColor.swift,
|
||||||
AppImage.swift,
|
AppImage.swift,
|
||||||
Defaults/AppDefaults.swift,
|
Defaults/AppDefaults.swift,
|
||||||
Defaults/ArticleTextSize.swift,
|
Defaults/ArticleTextSize.swift,
|
||||||
|
@ -15,6 +15,8 @@ import UIKit
|
|||||||
|
|
||||||
struct AppColor {
|
struct AppColor {
|
||||||
|
|
||||||
|
static var accent = color(isMac ? "AccentColor" : "primaryAccentColor")
|
||||||
|
static var star = color(isMac ? "StarColor" : "starColor")
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Mac
|
// MARK: - Mac
|
||||||
@ -33,7 +35,13 @@ extension AppColor {
|
|||||||
extension AppColor {
|
extension AppColor {
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
|
static var controlBackground = color("controlBackgroundColor")
|
||||||
|
static var fullScreenBackground = color("fullScreenBackgroundColor")
|
||||||
|
static var iconBackground = color("iconBackgroundColor")
|
||||||
|
static var secondaryAccent = color("secondaryAccentColor")
|
||||||
|
static var sectionHeader = color("sectionHeaderColor")
|
||||||
static var tickMark = color("tickMarkColor")
|
static var tickMark = color("tickMarkColor")
|
||||||
|
static var vibrantText = color("vibrantTextColor")
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +49,14 @@ extension AppColor {
|
|||||||
|
|
||||||
private extension AppColor {
|
private extension AppColor {
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
|
static var isMac = true
|
||||||
|
static var isiOS = false
|
||||||
|
#elseif os(iOS)
|
||||||
|
static var isMac = false
|
||||||
|
static var isiOS = true
|
||||||
|
#endif
|
||||||
|
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
static func color(_ name: String) -> NSColor {
|
static func color(_ name: String) -> NSColor {
|
||||||
NSColor(named: name)!
|
NSColor(named: name)!
|
||||||
|
@ -45,9 +45,13 @@ struct AppImage {
|
|||||||
static var articleExtractorOff = appImage("articleExtractorOff")
|
static var articleExtractorOff = appImage("articleExtractorOff")
|
||||||
static var articleExtractorOn = appImage("articleExtractorOn")
|
static var articleExtractorOn = appImage("articleExtractorOn")
|
||||||
static var faviconTemplate = appImage("faviconTemplateImage")
|
static var faviconTemplate = appImage("faviconTemplateImage")
|
||||||
|
static var filterActive = systemImage("line.horizontal.3.decrease.circle.fill")
|
||||||
|
static var filterInactive = systemImage("line.horizontal.3.decrease.circle")
|
||||||
static var markAllAsRead = appImage("markAllAsRead")
|
static var markAllAsRead = appImage("markAllAsRead")
|
||||||
static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
|
static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
|
||||||
static var share = systemImage("square.and.arrow.up")
|
static var share = systemImage("square.and.arrow.up")
|
||||||
|
static var starClosed = systemImage("star.fill")
|
||||||
|
static var starOpen = systemImage("star")
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Mac
|
// MARK: - Mac
|
||||||
@ -55,10 +59,75 @@ struct AppImage {
|
|||||||
extension AppImage {
|
extension AppImage {
|
||||||
|
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
|
static var addNewSidebarItem = systemImage("plus")
|
||||||
static var articleTheme = systemImage("doc.richtext")
|
static var articleTheme = systemImage("doc.richtext")
|
||||||
static var cleanUp = systemImage("wind")
|
static var cleanUp = systemImage("wind")
|
||||||
static var marsEditIcon = appImage("MarsEditIcon")
|
static var marsEditIcon = appImage("MarsEditIcon")
|
||||||
static var microblogIcon = appImage("MicroblogIcon")
|
static var microblogIcon = appImage("MicroblogIcon")
|
||||||
|
static var nextUnread = systemImage("chevron.down.circle")
|
||||||
|
static var openInBrowser = systemImage("safari")
|
||||||
|
static var preferencesToolbarAccounts = systemImage("at")
|
||||||
|
static var preferencesToolbarAdvanced = systemImage("gearshape.2")
|
||||||
|
static var preferencesToolbarGeneral = systemImage("gearshape")
|
||||||
|
static var readClosed = systemImage("largecircle.fill.circle")
|
||||||
|
static var readOpen = systemImage("circle")
|
||||||
|
static var refresh = systemImage("arrow.clockwise")
|
||||||
|
static var timelineStarSelected = appImage("timelineStar").tinted(with: .white)
|
||||||
|
static var timelineStarUnselected = appImage("timelineStar").tinted(with: AppColor.star)
|
||||||
|
|
||||||
|
static var swipeMarkRead: RSImage = {
|
||||||
|
RSImage(systemSymbolName: "circle", accessibilityDescription: "Mark Read")!
|
||||||
|
.withSymbolConfiguration(.init(scale: .large))!
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var swipeMarkUnread: RSImage = {
|
||||||
|
RSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: "Mark Unread")!
|
||||||
|
.withSymbolConfiguration(.init(scale: .large))!
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var swipeMarkStarred: RSImage = {
|
||||||
|
RSImage(systemSymbolName: "star.fill", accessibilityDescription: "Star")!
|
||||||
|
.withSymbolConfiguration(.init(scale: .large))!
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var swipeMarkUnstarred: RSImage = {
|
||||||
|
RSImage(systemSymbolName: "star", accessibilityDescription: "Unstar")!
|
||||||
|
.withSymbolConfiguration(.init(scale: .large))!
|
||||||
|
}()
|
||||||
|
|
||||||
|
// IconImages
|
||||||
|
|
||||||
|
static var searchFeed = IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSuppressed: true)
|
||||||
|
|
||||||
|
// TODO: handle color palette change
|
||||||
|
|
||||||
|
static var starredFeed: IconImage = {
|
||||||
|
let image = systemImage("star.fill")
|
||||||
|
let preferredColor = AppColor.star
|
||||||
|
let coloredImage = image.tinted(with: preferredColor)
|
||||||
|
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var todayFeed: IconImage = {
|
||||||
|
let image = systemImage("sun.max.fill")
|
||||||
|
let preferredColor = NSColor.orange
|
||||||
|
let coloredImage = image.tinted(with: preferredColor)
|
||||||
|
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var unreadFeed: IconImage = {
|
||||||
|
let image = systemImage("largecircle.fill.circle")
|
||||||
|
let preferredColor = AppColor.accent
|
||||||
|
let coloredImage = image.tinted(with: preferredColor)
|
||||||
|
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var folder: IconImage = {
|
||||||
|
let image = systemImage("folder")
|
||||||
|
let preferredColor = AppColor.accent
|
||||||
|
let coloredImage = image.tinted(with: preferredColor)
|
||||||
|
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
|
||||||
|
}()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,16 +138,14 @@ extension AppImage {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
static var articleExtractorOffSF = systemImage("doc.plaintext")
|
static var articleExtractorOffSF = systemImage("doc.plaintext")
|
||||||
static var articleExtractorOnSF = appImage("articleExtractorOnSF")
|
static var articleExtractorOnSF = appImage("articleExtractorOnSF")
|
||||||
static var articleExtractorOffTinted = articleExtractorOff.tinted(color: AppAssets.primaryAccentColor)!
|
static var articleExtractorOffTinted = articleExtractorOff.tinted(color: AppColor.accent)!
|
||||||
static var articleExtractorOnTinted = articleExtractorOn.tinted(color: AppAssets.primaryAccentColor)!
|
static var articleExtractorOnTinted = articleExtractorOn.tinted(color: AppColor.accent)!
|
||||||
static var circleClosed = systemImage("largecircle.fill.circle")
|
static var circleClosed = systemImage("largecircle.fill.circle")
|
||||||
static var circleOpen = systemImage("circle")
|
static var circleOpen = systemImage("circle")
|
||||||
static var copy = systemImage("doc.on.doc")
|
static var copy = systemImage("doc.on.doc")
|
||||||
static var deactivate = systemImage("minus.circle")
|
static var deactivate = systemImage("minus.circle")
|
||||||
static var disclosure = appImage("disclosure")
|
static var disclosure = appImage("disclosure")
|
||||||
static var edit = systemImage("square.and.pencil")
|
static var edit = systemImage("square.and.pencil")
|
||||||
static var filterActive = systemImage("line.horizontal.3.decrease.circle.fill")
|
|
||||||
static var filterInactive = systemImage("line.horizontal.3.decrease.circle")
|
|
||||||
static var folderOutlinePlus = systemImage("folder.badge.plus")
|
static var folderOutlinePlus = systemImage("folder.badge.plus")
|
||||||
static var info = systemImage("info.circle")
|
static var info = systemImage("info.circle")
|
||||||
static var markBelowAsRead = systemImage("arrowtriangle.down.circle")
|
static var markBelowAsRead = systemImage("arrowtriangle.down.circle")
|
||||||
@ -90,9 +157,34 @@ extension AppImage {
|
|||||||
static var plus = systemImage("plus")
|
static var plus = systemImage("plus")
|
||||||
static var previousArticle = systemImage("chevron.up")
|
static var previousArticle = systemImage("chevron.up")
|
||||||
static var safari = systemImage("safari")
|
static var safari = systemImage("safari")
|
||||||
static var timelineStar = systemImage("star.fill").withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
static var timelineStar = systemImage("star.fill").withTintColor(AppColor.star, renderingMode: .alwaysOriginal)
|
||||||
static var trash = systemImage("trash")
|
static var trash = systemImage("trash")
|
||||||
|
|
||||||
|
// IconImages
|
||||||
|
|
||||||
|
static var searchFeed = IconImage(systemImage("magnifyingglass"), isSymbol: true)
|
||||||
|
|
||||||
|
// TODO: handle color palette change
|
||||||
|
|
||||||
|
static var starredFeed: IconImage = {
|
||||||
|
let image = systemImage("star.fill")
|
||||||
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppColor.star.cgColor)
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var todayFeed: IconImage = {
|
||||||
|
let image = systemImage("sun.max.fill")
|
||||||
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor)
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var unreadFeed: IconImage = {
|
||||||
|
let image = systemImage("largecircle.fill.circle")
|
||||||
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppColor.secondaryAccent.cgColor)
|
||||||
|
}()
|
||||||
|
|
||||||
|
static var folder: IconImage = {
|
||||||
|
let image = systemImage("folder.fill")
|
||||||
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppColor.secondaryAccent.cgColor)
|
||||||
|
}()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,6 @@ extension Feed: SmallIconProvider {
|
|||||||
|
|
||||||
extension Folder: SmallIconProvider {
|
extension Folder: SmallIconProvider {
|
||||||
var smallIcon: IconImage? {
|
var smallIcon: IconImage? {
|
||||||
AppAssets.folderImage
|
AppImage.folder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ struct SearchFeedDelegate: SmartFeedDelegate {
|
|||||||
let nameForDisplayPrefix = NSLocalizedString("Search: ", comment: "Search smart feed title prefix")
|
let nameForDisplayPrefix = NSLocalizedString("Search: ", comment: "Search smart feed title prefix")
|
||||||
let searchString: String
|
let searchString: String
|
||||||
let fetchType: FetchType
|
let fetchType: FetchType
|
||||||
var smallIcon: IconImage? = AppAssets.searchFeedImage
|
var smallIcon: IconImage? = AppImage.searchFeed
|
||||||
|
|
||||||
init(searchString: String) {
|
init(searchString: String) {
|
||||||
self.searchString = searchString
|
self.searchString = searchString
|
||||||
|
@ -25,7 +25,7 @@ struct SearchTimelineFeedDelegate: SmartFeedDelegate {
|
|||||||
let nameForDisplayPrefix = NSLocalizedString("Search: ", comment: "Search smart feed title prefix")
|
let nameForDisplayPrefix = NSLocalizedString("Search: ", comment: "Search smart feed title prefix")
|
||||||
let searchString: String
|
let searchString: String
|
||||||
let fetchType: FetchType
|
let fetchType: FetchType
|
||||||
var smallIcon: IconImage? = AppAssets.searchFeedImage
|
var smallIcon: IconImage? = AppImage.searchFeed
|
||||||
|
|
||||||
init(searchString: String, articleIDs: Set<String>) {
|
init(searchString: String, articleIDs: Set<String>) {
|
||||||
self.searchString = searchString
|
self.searchString = searchString
|
||||||
|
@ -23,7 +23,7 @@ struct StarredFeedDelegate: SmartFeedDelegate {
|
|||||||
let nameForDisplay = NSLocalizedString("Starred", comment: "Starred pseudo-feed title")
|
let nameForDisplay = NSLocalizedString("Starred", comment: "Starred pseudo-feed title")
|
||||||
let fetchType: FetchType = .starred(nil)
|
let fetchType: FetchType = .starred(nil)
|
||||||
var smallIcon: IconImage? {
|
var smallIcon: IconImage? {
|
||||||
return AppAssets.starredFeedImage
|
return AppImage.starredFeed
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchUnreadCount(for account: Account, completion: @escaping SingleUnreadCountCompletionBlock) {
|
func fetchUnreadCount(for account: Account, completion: @escaping SingleUnreadCountCompletionBlock) {
|
||||||
|
@ -21,7 +21,7 @@ struct TodayFeedDelegate: SmartFeedDelegate {
|
|||||||
let nameForDisplay = NSLocalizedString("Today", comment: "Today pseudo-feed title")
|
let nameForDisplay = NSLocalizedString("Today", comment: "Today pseudo-feed title")
|
||||||
let fetchType = FetchType.today(nil)
|
let fetchType = FetchType.today(nil)
|
||||||
var smallIcon: IconImage? {
|
var smallIcon: IconImage? {
|
||||||
return AppAssets.todayFeedImage
|
return AppImage.todayFeed
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchUnreadCount(for account: Account, completion: @escaping SingleUnreadCountCompletionBlock) {
|
func fetchUnreadCount(for account: Account, completion: @escaping SingleUnreadCountCompletionBlock) {
|
||||||
|
@ -42,7 +42,7 @@ final class UnreadFeed: PseudoFeed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var smallIcon: IconImage? {
|
var smallIcon: IconImage? {
|
||||||
return AppAssets.unreadFeedImage
|
return AppImage.unreadFeed
|
||||||
}
|
}
|
||||||
|
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
|
@ -16,7 +16,7 @@ final class AddComboTableViewCell: VibrantTableViewCell {
|
|||||||
override func updateVibrancy(animated: Bool) {
|
override func updateVibrancy(animated: Bool) {
|
||||||
super.updateVibrancy(animated: animated)
|
super.updateVibrancy(animated: animated)
|
||||||
|
|
||||||
let iconTintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : AppAssets.secondaryAccentColor
|
let iconTintColor = isHighlighted || isSelected ? AppColor.vibrantText : AppColor.secondaryAccent
|
||||||
if animated {
|
if animated {
|
||||||
UIView.animate(withDuration: Self.duration) {
|
UIView.animate(withDuration: Self.duration) {
|
||||||
self.icon.tintColor = iconTintColor
|
self.icon.tintColor = iconTintColor
|
||||||
|
@ -16,7 +16,7 @@ final class SelectComboTableViewCell: VibrantTableViewCell {
|
|||||||
override func updateVibrancy(animated: Bool) {
|
override func updateVibrancy(animated: Bool) {
|
||||||
super.updateVibrancy(animated: animated)
|
super.updateVibrancy(animated: animated)
|
||||||
|
|
||||||
let iconTintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.label
|
let iconTintColor = isHighlighted || isSelected ? AppColor.vibrantText : UIColor.label
|
||||||
if animated {
|
if animated {
|
||||||
UIView.animate(withDuration: Self.duration) {
|
UIView.animate(withDuration: Self.duration) {
|
||||||
self.icon.tintColor = iconTintColor
|
self.icon.tintColor = iconTintColor
|
||||||
|
@ -1,281 +0,0 @@
|
|||||||
//
|
|
||||||
// AppAssets.swift
|
|
||||||
// NetNewsWire
|
|
||||||
//
|
|
||||||
// Created by Maurice Parker on 4/8/19.
|
|
||||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
||||||
//
|
|
||||||
import UIKit
|
|
||||||
import RSCore
|
|
||||||
import Account
|
|
||||||
|
|
||||||
struct AppAssets {
|
|
||||||
|
|
||||||
// static var accountBazQuxImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountBazQux")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var accountCloudKitImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountCloudKit")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountFeedbinImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountFeedbin")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountFeedlyImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountFeedly")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountFreshRSSImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountFreshRSS")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountInoreaderImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountInoreader")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountLocalPadImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountLocalPad")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountLocalPhoneImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountLocalPhone")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountNewsBlurImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountNewsBlur")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var accountTheOldReaderImage: UIImage = {
|
|
||||||
// return UIImage(named: "accountTheOldReader")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
|
|
||||||
|
|
||||||
// static var articleExtractorError: UIImage = {
|
|
||||||
// return UIImage(named: "articleExtractorError")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOff: UIImage = {
|
|
||||||
// return UIImage(named: "articleExtractorOff")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOffSF: UIImage = {
|
|
||||||
// return UIImage(systemName: "doc.plaintext")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOffTinted: UIImage = {
|
|
||||||
// let image = UIImage(named: "articleExtractorOff")!
|
|
||||||
// return image.tinted(color: AppAssets.primaryAccentColor)!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOn: UIImage = {
|
|
||||||
// return UIImage(named: "articleExtractorOn")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOnSF: UIImage = {
|
|
||||||
// return UIImage(named: "articleExtractorOnSF")!
|
|
||||||
// }()
|
|
||||||
//
|
|
||||||
// static var articleExtractorOnTinted: UIImage = {
|
|
||||||
// let image = UIImage(named: "articleExtractorOn")!
|
|
||||||
// return image.tinted(color: AppAssets.primaryAccentColor)!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var iconBackgroundColor: UIColor = {
|
|
||||||
return UIColor(named: "iconBackgroundColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var circleClosedImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "largecircle.fill.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var circleOpenImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var disclosureImage: UIImage = {
|
|
||||||
// return UIImage(named: "disclosure")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var copyImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "doc.on.doc")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var deactivateImage: UIImage = {
|
|
||||||
// UIImage(systemName: "minus.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var editImage: UIImage = {
|
|
||||||
// UIImage(systemName: "square.and.pencil")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var faviconTemplateImage: RSImage = {
|
|
||||||
// return RSImage(named: "faviconTemplateImage")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var filterInactiveImage: UIImage = {
|
|
||||||
// UIImage(systemName: "line.horizontal.3.decrease.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var filterActiveImage: UIImage = {
|
|
||||||
// UIImage(systemName: "line.horizontal.3.decrease.circle.fill")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var folderOutlinePlus: UIImage = {
|
|
||||||
// UIImage(systemName: "folder.badge.plus")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var fullScreenBackgroundColor: UIColor = {
|
|
||||||
return UIColor(named: "fullScreenBackgroundColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var infoImage: UIImage = {
|
|
||||||
// UIImage(systemName: "info.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var markAllAsReadImage: UIImage = {
|
|
||||||
// return UIImage(named: "markAllAsRead")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var markBelowAsReadImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "arrowtriangle.down.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var markAboveAsReadImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "arrowtriangle.up.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var folderImage: IconImage = {
|
|
||||||
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var moreImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "ellipsis.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var nextArticleImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "chevron.down")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var nextUnreadArticleImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "chevron.down.circle")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var plus: UIImage = {
|
|
||||||
// UIImage(systemName: "plus")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var prevArticleImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "chevron.up")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var openInSidebarImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "arrow.turn.down.left")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var primaryAccentColor: UIColor {
|
|
||||||
return UIColor(named: "primaryAccentColor")!
|
|
||||||
}
|
|
||||||
|
|
||||||
// static var safariImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "safari")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var searchFeedImage: IconImage = {
|
|
||||||
return IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var secondaryAccentColor: UIColor {
|
|
||||||
return UIColor(named: "secondaryAccentColor")!
|
|
||||||
}
|
|
||||||
|
|
||||||
static var sectionHeaderColor: UIColor = {
|
|
||||||
return UIColor(named: "sectionHeaderColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var shareImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "square.and.arrow.up")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
// static var smartFeedImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "gear")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var starColor: UIColor = {
|
|
||||||
return UIColor(named: "starColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var starClosedImage: UIImage = {
|
|
||||||
return UIImage(systemName: "star.fill")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var starOpenImage: UIImage = {
|
|
||||||
return UIImage(systemName: "star")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var starredFeedImage: IconImage {
|
|
||||||
let image = UIImage(systemName: "star.fill")!
|
|
||||||
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.starColor.cgColor)
|
|
||||||
}
|
|
||||||
|
|
||||||
static var tickMarkColor: UIColor = {
|
|
||||||
return UIColor(named: "tickMarkColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static var timelineStarImage: UIImage = {
|
|
||||||
// let image = UIImage(systemName: "star.fill")!
|
|
||||||
// return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var todayFeedImage: IconImage {
|
|
||||||
let image = UIImage(systemName: "sun.max.fill")!
|
|
||||||
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor)
|
|
||||||
}
|
|
||||||
|
|
||||||
// static var trashImage: UIImage = {
|
|
||||||
// return UIImage(systemName: "trash")!
|
|
||||||
// }()
|
|
||||||
|
|
||||||
static var unreadFeedImage: IconImage {
|
|
||||||
let image = UIImage(systemName: "largecircle.fill.circle")!
|
|
||||||
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
|
||||||
}
|
|
||||||
|
|
||||||
static var vibrantTextColor: UIColor = {
|
|
||||||
return UIColor(named: "vibrantTextColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
static var controlBackgroundColor: UIColor = {
|
|
||||||
return UIColor(named: "controlBackgroundColor")!
|
|
||||||
}()
|
|
||||||
|
|
||||||
// static func image(for accountType: AccountType) -> UIImage? {
|
|
||||||
// switch accountType {
|
|
||||||
// case .onMyMac:
|
|
||||||
// if UIDevice.current.userInterfaceIdiom == .pad {
|
|
||||||
// return AppAssets.accountLocalPadImage
|
|
||||||
// } else {
|
|
||||||
// return AppAssets.accountLocalPhoneImage
|
|
||||||
// }
|
|
||||||
// case .cloudKit:
|
|
||||||
// return AppAssets.accountCloudKitImage
|
|
||||||
// case .feedbin:
|
|
||||||
// return AppAssets.accountFeedbinImage
|
|
||||||
// case .feedly:
|
|
||||||
// return AppAssets.accountFeedlyImage
|
|
||||||
// case .freshRSS:
|
|
||||||
// return AppAssets.accountFreshRSSImage
|
|
||||||
// case .newsBlur:
|
|
||||||
// return AppAssets.accountNewsBlurImage
|
|
||||||
// case .inoreader:
|
|
||||||
// return AppAssets.accountInoreaderImage
|
|
||||||
// case .bazQux:
|
|
||||||
// return AppAsset.accountBazQuxImage
|
|
||||||
// case .theOldReader:
|
|
||||||
// return AppAssets.accountTheOldReaderImage
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
@ -233,10 +233,10 @@ final class ArticleViewController: UIViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if article.status.starred {
|
if article.status.starred {
|
||||||
starBarButtonItem.image = AppAssets.starClosedImage
|
starBarButtonItem.image = AppImage.starClosed
|
||||||
starBarButtonItem.accLabelText = NSLocalizedString("Selected - Star Article", comment: "Selected - Star Article")
|
starBarButtonItem.accLabelText = NSLocalizedString("Selected - Star Article", comment: "Selected - Star Article")
|
||||||
} else {
|
} else {
|
||||||
starBarButtonItem.image = AppAssets.starOpenImage
|
starBarButtonItem.image = AppImage.starOpen
|
||||||
starBarButtonItem.accLabelText = NSLocalizedString("Star Article", comment: "Star Article")
|
starBarButtonItem.accLabelText = NSLocalizedString("Star Article", comment: "Star Article")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ final class ImageTransition: NSObject, UIViewControllerAnimatedTransitioning {
|
|||||||
let fromView = transitionContext.view(forKey: .from)!
|
let fromView = transitionContext.view(forKey: .from)!
|
||||||
fromView.removeFromSuperview()
|
fromView.removeFromSuperview()
|
||||||
|
|
||||||
transitionContext.containerView.backgroundColor = AppAssets.fullScreenBackgroundColor
|
transitionContext.containerView.backgroundColor = AppColor.fullScreenBackground
|
||||||
transitionContext.containerView.addSubview(imageView)
|
transitionContext.containerView.addSubview(imageView)
|
||||||
|
|
||||||
webViewController?.hideClickedImage()
|
webViewController?.hideClickedImage()
|
||||||
|
@ -751,7 +751,7 @@ private extension WebViewController {
|
|||||||
func toggleStarredAction() -> UIAction {
|
func toggleStarredAction() -> UIAction {
|
||||||
let starred = article?.status.starred ?? false
|
let starred = article?.status.starred ?? false
|
||||||
let title = starred ? NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") : NSLocalizedString("Mark as Starred", comment: "Mark as Starred")
|
let title = starred ? NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") : NSLocalizedString("Mark as Starred", comment: "Mark as Starred")
|
||||||
let starredImage = starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
let starredImage = starred ? AppImage.starOpen : AppImage.starClosed
|
||||||
return UIAction(title: title, image: starredImage) { [weak self] _ in
|
return UIAction(title: title, image: starredImage) { [weak self] _ in
|
||||||
self?.coordinator.toggleStarredForCurrentArticle()
|
self?.coordinator.toggleStarredForCurrentArticle()
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ private extension IconView {
|
|||||||
|
|
||||||
private func updateBackgroundColor() {
|
private func updateBackgroundColor() {
|
||||||
if !isBackgroundSuppressed && ((iconImage != nil && isVerticalBackgroundExposed) || !isDiscernable) {
|
if !isBackgroundSuppressed && ((iconImage != nil && isVerticalBackgroundExposed) || !isDiscernable) {
|
||||||
backgroundColor = AppAssets.iconBackgroundColor
|
backgroundColor = AppColor.iconBackground
|
||||||
} else {
|
} else {
|
||||||
backgroundColor = nil
|
backgroundColor = nil
|
||||||
}
|
}
|
||||||
|
@ -171,12 +171,12 @@ final class MainFeedTableViewCell: VibrantTableViewCell {
|
|||||||
|
|
||||||
let iconTintColor: UIColor
|
let iconTintColor: UIColor
|
||||||
if isHighlighted || isSelected {
|
if isHighlighted || isSelected {
|
||||||
iconTintColor = AppAssets.vibrantTextColor
|
iconTintColor = AppColor.vibrantText
|
||||||
} else {
|
} else {
|
||||||
if let preferredColor = iconImage?.preferredColor {
|
if let preferredColor = iconImage?.preferredColor {
|
||||||
iconTintColor = UIColor(cgColor: preferredColor)
|
iconTintColor = UIColor(cgColor: preferredColor)
|
||||||
} else {
|
} else {
|
||||||
iconTintColor = AppAssets.secondaryAccentColor
|
iconTintColor = AppColor.secondaryAccent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ private extension MainFeedTableViewCell {
|
|||||||
disclosureButton = NonIntrinsicButton(type: .roundedRect)
|
disclosureButton = NonIntrinsicButton(type: .roundedRect)
|
||||||
disclosureButton!.addTarget(self, action: #selector(buttonPressed(_:)), for: UIControl.Event.touchUpInside)
|
disclosureButton!.addTarget(self, action: #selector(buttonPressed(_:)), for: UIControl.Event.touchUpInside)
|
||||||
disclosureButton?.setImage(AppImage.disclosure, for: .normal)
|
disclosureButton?.setImage(AppImage.disclosure, for: .normal)
|
||||||
disclosureButton?.tintColor = AppAssets.controlBackgroundColor
|
disclosureButton?.tintColor = AppColor.controlBackground
|
||||||
disclosureButton?.imageView?.contentMode = .center
|
disclosureButton?.imageView?.contentMode = .center
|
||||||
disclosureButton?.imageView?.clipsToBounds = false
|
disclosureButton?.imageView?.clipsToBounds = false
|
||||||
disclosureButton?.addInteraction(UIPointerInteraction())
|
disclosureButton?.addInteraction(UIPointerInteraction())
|
||||||
|
@ -203,7 +203,7 @@ private extension MainFeedTableViewSectionHeader {
|
|||||||
|
|
||||||
func addBackgroundView() {
|
func addBackgroundView() {
|
||||||
self.backgroundView = UIView(frame: self.bounds)
|
self.backgroundView = UIView(frame: self.bounds)
|
||||||
self.backgroundView?.backgroundColor = AppAssets.sectionHeaderColor
|
self.backgroundView?.backgroundColor = AppColor.sectionHeader
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class MainFeedUnreadCountView: UIView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cornerRadius = 8.0
|
let cornerRadius = 8.0
|
||||||
let bgColor = AppAssets.controlBackgroundColor
|
let bgColor = AppColor.controlBackground
|
||||||
var textColor: UIColor {
|
var textColor: UIColor {
|
||||||
return UIColor.white
|
return UIColor.white
|
||||||
}
|
}
|
||||||
|
@ -62,16 +62,16 @@ final class MainTimelineTableViewCell: VibrantTableViewCell {
|
|||||||
if animated {
|
if animated {
|
||||||
UIView.animate(withDuration: Self.duration) {
|
UIView.animate(withDuration: Self.duration) {
|
||||||
if self.isHighlighted || self.isSelected {
|
if self.isHighlighted || self.isSelected {
|
||||||
self.unreadIndicatorView.backgroundColor = AppAssets.vibrantTextColor
|
self.unreadIndicatorView.backgroundColor = AppColor.vibrantText
|
||||||
} else {
|
} else {
|
||||||
self.unreadIndicatorView.backgroundColor = AppAssets.secondaryAccentColor
|
self.unreadIndicatorView.backgroundColor = AppColor.secondaryAccent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if self.isHighlighted || self.isSelected {
|
if self.isHighlighted || self.isSelected {
|
||||||
self.unreadIndicatorView.backgroundColor = AppAssets.vibrantTextColor
|
self.unreadIndicatorView.backgroundColor = AppColor.vibrantText
|
||||||
} else {
|
} else {
|
||||||
self.unreadIndicatorView.backgroundColor = AppAssets.secondaryAccentColor
|
self.unreadIndicatorView.backgroundColor = AppColor.secondaryAccent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ final class MainTimelineUnreadCountView: MainFeedUnreadCountView {
|
|||||||
let cornerRadii = CGSize(width: cornerRadius, height: cornerRadius)
|
let cornerRadii = CGSize(width: cornerRadius, height: cornerRadius)
|
||||||
let rect = CGRect(x: 1, y: 1, width: bounds.width - 2, height: bounds.height - 2)
|
let rect = CGRect(x: 1, y: 1, width: bounds.width - 2, height: bounds.height - 2)
|
||||||
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: .allCorners, cornerRadii: cornerRadii)
|
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: .allCorners, cornerRadii: cornerRadii)
|
||||||
AppAssets.primaryAccentColor.setFill()
|
AppColor.accent.setFill()
|
||||||
path.fill()
|
path.fill()
|
||||||
|
|
||||||
if unreadCount > 0 {
|
if unreadCount > 0 {
|
||||||
|
@ -283,7 +283,7 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
|
|||||||
}
|
}
|
||||||
|
|
||||||
readAction.image = article.status.read ? AppImage.circleClosed : AppImage.circleOpen
|
readAction.image = article.status.read ? AppImage.circleClosed : AppImage.circleOpen
|
||||||
readAction.backgroundColor = AppAssets.primaryAccentColor
|
readAction.backgroundColor = AppColor.accent
|
||||||
|
|
||||||
return UISwipeActionsConfiguration(actions: [readAction])
|
return UISwipeActionsConfiguration(actions: [readAction])
|
||||||
}
|
}
|
||||||
@ -302,8 +302,8 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
|
|||||||
completion(true)
|
completion(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
starAction.image = article.status.starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
starAction.image = article.status.starred ? AppImage.starOpen : AppImage.starClosed
|
||||||
starAction.backgroundColor = AppAssets.starColor
|
starAction.backgroundColor = AppColor.star
|
||||||
|
|
||||||
// Set up the read action
|
// Set up the read action
|
||||||
let moreTitle = NSLocalizedString("More", comment: "More")
|
let moreTitle = NSLocalizedString("More", comment: "More")
|
||||||
@ -805,7 +805,7 @@ private extension TimelineViewController {
|
|||||||
let title = article.status.starred ?
|
let title = article.status.starred ?
|
||||||
NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") :
|
NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") :
|
||||||
NSLocalizedString("Mark as Starred", comment: "Mark as Starred")
|
NSLocalizedString("Mark as Starred", comment: "Mark as Starred")
|
||||||
let image = article.status.starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
let image = article.status.starred ? AppImage.starOpen : AppImage.starClosed
|
||||||
|
|
||||||
let action = UIAction(title: title, image: image) { [weak self] _ in
|
let action = UIAction(title: title, image: image) { [weak self] _ in
|
||||||
self?.coordinator.toggleStar(article)
|
self?.coordinator.toggleStar(article)
|
||||||
|
@ -19,7 +19,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
|
|
||||||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
||||||
|
|
||||||
window!.tintColor = AppAssets.primaryAccentColor
|
window!.tintColor = AppColor.accent
|
||||||
updateUserInterfaceStyle()
|
updateUserInterfaceStyle()
|
||||||
UINavigationBar.appearance().scrollEdgeAppearance = UINavigationBarAppearance()
|
UINavigationBar.appearance().scrollEdgeAppearance = UINavigationBarAppearance()
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ final class SettingsComboTableViewCell: VibrantTableViewCell {
|
|||||||
super.updateVibrancy(animated: animated)
|
super.updateVibrancy(animated: animated)
|
||||||
updateLabelVibrancy(comboNameLabel, color: labelColor, animated: animated)
|
updateLabelVibrancy(comboNameLabel, color: labelColor, animated: animated)
|
||||||
|
|
||||||
let tintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.label
|
let tintColor = isHighlighted || isSelected ? AppColor.vibrantText : UIColor.label
|
||||||
if animated {
|
if animated {
|
||||||
UIView.animate(withDuration: Self.duration) {
|
UIView.animate(withDuration: Self.duration) {
|
||||||
self.comboImage?.tintColor = tintColor
|
self.comboImage?.tintColor = tintColor
|
||||||
|
@ -84,7 +84,7 @@ private extension TimelinePreviewTableViewController {
|
|||||||
status: status
|
status: status
|
||||||
)
|
)
|
||||||
|
|
||||||
let iconImage = IconImage(AppImage.faviconTemplate.withTintColor(AppAssets.secondaryAccentColor))
|
let iconImage = IconImage(AppImage.faviconTemplate.withTintColor(AppColor.secondaryAccent))
|
||||||
|
|
||||||
return MainTimelineCellData(
|
return MainTimelineCellData(
|
||||||
article: prototypeArticle,
|
article: prototypeArticle,
|
||||||
|
@ -48,7 +48,7 @@ final class ShareFolderPickerController: UITableViewController {
|
|||||||
if let account = container as? ExtensionAccount {
|
if let account = container as? ExtensionAccount {
|
||||||
cell.icon.image = AppImage.account(account.type)
|
cell.icon.image = AppImage.account(account.type)
|
||||||
} else {
|
} else {
|
||||||
cell.icon.image = AppAssets.folderImage.image
|
cell.icon.image = AppImage.folder.image
|
||||||
}
|
}
|
||||||
|
|
||||||
cell.label?.text = container?.name ?? ""
|
cell.label?.text = container?.name ?? ""
|
||||||
|
@ -53,11 +53,11 @@ private extension InteractiveNavigationController {
|
|||||||
scrollEdgeStandardAppearance.backgroundColor = .systemBackground
|
scrollEdgeStandardAppearance.backgroundColor = .systemBackground
|
||||||
navigationBar.scrollEdgeAppearance = scrollEdgeStandardAppearance
|
navigationBar.scrollEdgeAppearance = scrollEdgeStandardAppearance
|
||||||
|
|
||||||
navigationBar.tintColor = AppAssets.primaryAccentColor
|
navigationBar.tintColor = AppColor.accent
|
||||||
|
|
||||||
let toolbarAppearance = UIToolbarAppearance()
|
let toolbarAppearance = UIToolbarAppearance()
|
||||||
toolbar.standardAppearance = toolbarAppearance
|
toolbar.standardAppearance = toolbarAppearance
|
||||||
toolbar.compactAppearance = toolbarAppearance
|
toolbar.compactAppearance = toolbarAppearance
|
||||||
toolbar.tintColor = AppAssets.primaryAccentColor
|
toolbar.tintColor = AppColor.accent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ final class TickMarkSlider: UISlider {
|
|||||||
|
|
||||||
let tick = UIView()
|
let tick = UIView()
|
||||||
tick.translatesAutoresizingMaskIntoConstraints = false
|
tick.translatesAutoresizingMaskIntoConstraints = false
|
||||||
tick.backgroundColor = AppAssets.tickMarkColor
|
tick.backgroundColor = AppColor.tickMark
|
||||||
insertSubview(tick, at: 0)
|
insertSubview(tick, at: 0)
|
||||||
|
|
||||||
tick.widthAnchor.constraint(equalToConstant: 3).isActive = true
|
tick.widthAnchor.constraint(equalToConstant: 3).isActive = true
|
||||||
|
@ -10,7 +10,7 @@ import UIKit
|
|||||||
|
|
||||||
final class VibrantButton: UIButton {
|
final class VibrantButton: UIButton {
|
||||||
|
|
||||||
@IBInspectable var backgroundHighlightColor: UIColor = AppAssets.secondaryAccentColor
|
@IBInspectable var backgroundHighlightColor: UIColor = AppColor.secondaryAccent
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
@ -22,8 +22,8 @@ final class VibrantButton: UIButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func commonInit() {
|
private func commonInit() {
|
||||||
setTitleColor(AppAssets.vibrantTextColor, for: .highlighted)
|
setTitleColor(AppColor.vibrantText, for: .highlighted)
|
||||||
let disabledColor = AppAssets.secondaryAccentColor.withAlphaComponent(0.5)
|
let disabledColor = AppColor.secondaryAccent.withAlphaComponent(0.5)
|
||||||
setTitleColor(disabledColor, for: .disabled)
|
setTitleColor(disabledColor, for: .disabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ final class VibrantLabel: UILabel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func commonInit() {
|
private func commonInit() {
|
||||||
highlightedTextColor = AppAssets.vibrantTextColor
|
highlightedTextColor = AppColor.vibrantText
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,11 @@ class VibrantTableViewCell: UITableViewCell {
|
|||||||
static let duration: TimeInterval = 0.6
|
static let duration: TimeInterval = 0.6
|
||||||
|
|
||||||
var labelColor: UIColor {
|
var labelColor: UIColor {
|
||||||
return isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.label
|
return isHighlighted || isSelected ? AppColor.vibrantText : UIColor.label
|
||||||
}
|
}
|
||||||
|
|
||||||
var secondaryLabelColor: UIColor {
|
var secondaryLabelColor: UIColor {
|
||||||
return isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.secondaryLabel
|
return isHighlighted || isSelected ? AppColor.vibrantText : UIColor.secondaryLabel
|
||||||
}
|
}
|
||||||
|
|
||||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
@ -47,7 +47,7 @@ class VibrantTableViewCell: UITableViewCell {
|
|||||||
/// Subclass overrides should call super
|
/// Subclass overrides should call super
|
||||||
func applyThemeProperties() {
|
func applyThemeProperties() {
|
||||||
let selectedBackgroundView = UIView(frame: .zero)
|
let selectedBackgroundView = UIView(frame: .zero)
|
||||||
selectedBackgroundView.backgroundColor = AppAssets.secondaryAccentColor
|
selectedBackgroundView.backgroundColor = AppColor.secondaryAccent
|
||||||
self.selectedBackgroundView = selectedBackgroundView
|
self.selectedBackgroundView = selectedBackgroundView
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ final class VibrantBasicTableViewCell: VibrantTableViewCell {
|
|||||||
@IBInspectable var imageSelected: UIImage?
|
@IBInspectable var imageSelected: UIImage?
|
||||||
|
|
||||||
var iconTint: UIColor {
|
var iconTint: UIColor {
|
||||||
return isHighlighted || isSelected ? labelColor : AppAssets.primaryAccentColor
|
return isHighlighted || isSelected ? labelColor : AppColor.accent
|
||||||
}
|
}
|
||||||
|
|
||||||
var iconImage: UIImage? {
|
var iconImage: UIImage? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user