Implement NetNewsWire Blue for cell selection and tint. Issue #691 & #692

This commit is contained in:
Maurice Parker 2019-06-18 18:31:37 -05:00
parent ae2c4b9d25
commit 716653c235
13 changed files with 53 additions and 58 deletions

View File

@ -36,26 +36,21 @@ struct AppAssets {
return RSImage(named: "faviconTemplateImage")! return RSImage(named: "faviconTemplateImage")!
}() }()
static var feedColor: UIColor = {
return UIColor(named: "feedColor")!
}()
static var feedImage: RSImage = { static var feedImage: RSImage = {
let image = RSImage(named: "feedImage")! return RSImage(named: "feedImage")!
return image.maskWithColor(color: AppAssets.feedColor.cgColor)!
}() }()
static var masterFolderColor: UIColor = { static var masterFolderColor: UIColor = {
return UIColor(named: "masterFolderColor")! return UIColor(named: "masterFolderColor")!
}() }()
static var masterFolderImage: RSImage = { static var masterFolderImage: RSImage = {
let image = RSImage(named: "folderImage")! let image = RSImage(named: "folderImage")!
return image.maskWithColor(color: AppAssets.masterFolderColor.cgColor)! return image.maskWithColor(color: AppAssets.masterFolderColor.cgColor)!
}() }()
static var selectionBackgroundColor: UIColor = { static var netNewsWireBlueColor: UIColor = {
return UIColor(named: "selectionBackgroundColor")! return UIColor(named: "netNewsWireBlueColor")!
}() }()
static var smartFeedColor: UIColor = { static var smartFeedColor: UIColor = {

View File

@ -71,6 +71,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
splitViewController.delegate = self splitViewController.delegate = self
window!.tintColor = AppAssets.netNewsWireBlueColor
AppDefaults.registerDefaults() AppDefaults.registerDefaults()
let isFirstRun = AppDefaults.isFirstRun let isFirstRun = AppDefaults.isFirstRun
if isFirstRun { if isFirstRun {

View File

@ -144,7 +144,7 @@ private extension MasterFeedTableViewCell {
func theme() { func theme() {
let bgView = UIView() let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor bgView.backgroundColor = AppAssets.netNewsWireBlueColor
selectedBackgroundView = bgView selectedBackgroundView = bgView
} }

View File

@ -28,7 +28,7 @@ extension MasterTimelineCellLayout {
var r = CGRect.zero var r = CGRect.zero
r.size = CGSize(width: MasterTimelineDefaultCellLayout.unreadCircleDimension, height: MasterTimelineDefaultCellLayout.unreadCircleDimension) r.size = CGSize(width: MasterTimelineDefaultCellLayout.unreadCircleDimension, height: MasterTimelineDefaultCellLayout.unreadCircleDimension)
r.origin.x = point.x r.origin.x = point.x
r.origin.y = point.y + 4 r.origin.y = point.y + 5
return r return r
} }
@ -38,7 +38,7 @@ extension MasterTimelineCellLayout {
r.size.width = MasterTimelineDefaultCellLayout.starDimension r.size.width = MasterTimelineDefaultCellLayout.starDimension
r.size.height = MasterTimelineDefaultCellLayout.starDimension r.size.height = MasterTimelineDefaultCellLayout.starDimension
r.origin.x = floor(point.x - ((MasterTimelineDefaultCellLayout.starDimension - MasterTimelineDefaultCellLayout.unreadCircleDimension) / 2.0)) r.origin.x = floor(point.x - ((MasterTimelineDefaultCellLayout.starDimension - MasterTimelineDefaultCellLayout.unreadCircleDimension) / 2.0))
r.origin.y = point.y + 2 r.origin.y = point.y + 3
return r return r
} }

View File

@ -123,7 +123,7 @@ private extension MasterTimelineTableViewCell {
func theme() { func theme() {
let bgView = UIView() let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor bgView.backgroundColor = AppAssets.netNewsWireBlueColor
selectedBackgroundView = bgView selectedBackgroundView = bgView
} }

View File

@ -139,7 +139,7 @@ class MasterTimelineViewController: ProgressTableViewController, UndoableCommand
} }
readAction.image = AppAssets.circleClosedImage readAction.image = AppAssets.circleClosedImage
readAction.backgroundColor = AppAssets.timelineUnreadCircleColor readAction.backgroundColor = AppAssets.netNewsWireBlueColor
// Set up the star action // Set up the star action
let starTitle = article.status.starred ? let starTitle = article.status.starred ?

View File

@ -1,20 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "20",
"alpha" : "1.000",
"blue" : "243",
"green" : "140"
}
}
}
]
}

View File

@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x08",
"alpha" : "1.000",
"blue" : "0xEE",
"green" : "0x6A"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x44",
"alpha" : "1.000",
"blue" : "0xE2",
"green" : "0x90"
}
}
}
]
}

View File

@ -1,20 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "111",
"alpha" : "1.000",
"blue" : "250",
"green" : "175"
}
}
}
]
}

View File

@ -59,7 +59,7 @@ extension DetailAccountViewController {
} }
let bgView = UIView() let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView cell.selectedBackgroundView = bgView
return cell return cell
} }

View File

@ -25,7 +25,7 @@ class RefreshIntervalViewController: UITableViewController {
cell.textLabel?.adjustsFontForContentSizeCategory = true cell.textLabel?.adjustsFontForContentSizeCategory = true
let bgView = UIView() let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView cell.selectedBackgroundView = bgView
let userRefreshInterval = AppDefaults.refreshInterval let userRefreshInterval = AppDefaults.refreshInterval

View File

@ -93,7 +93,7 @@ class SettingsViewController: UITableViewController {
} }
let bgView = UIView() let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView cell.selectedBackgroundView = bgView
return cell return cell

View File

@ -25,7 +25,7 @@ class TimelineNumberOfLinesViewController: UITableViewController {
cell.textLabel?.adjustsFontForContentSizeCategory = true cell.textLabel?.adjustsFontForContentSizeCategory = true
let bgView = UIView() let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView cell.selectedBackgroundView = bgView
cell.textLabel?.text = "\(2 + indexPath.row)" + NSLocalizedString(" lines", comment: "Lines") cell.textLabel?.text = "\(2 + indexPath.row)" + NSLocalizedString(" lines", comment: "Lines")