Change cell selection background color to be blue. Issue #619

This commit is contained in:
Maurice Parker 2019-04-20 17:12:39 -05:00
parent 1b793c4827
commit 48d6f11aeb
6 changed files with 45 additions and 7 deletions

View File

@ -53,6 +53,10 @@ struct AppAssets {
return image.maskWithColor(color: AppAssets.masterFolderColor)!
}()
static var selectionBackgroundColor: UIColor = {
return UIColor(named: "selectionBackgroundColor")!
}()
static var starColor: UIColor = {
return UIColor(named: "starColor")!
}()

View File

@ -129,12 +129,19 @@ class MasterTableViewCell : UITableViewCell {
private extension MasterTableViewCell {
func commonInit() {
theme()
addSubviewAtInit(unreadCountView)
addSubviewAtInit(faviconImageView)
addSubviewAtInit(titleView)
addDisclosureView()
}
func theme() {
let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor
selectedBackgroundView = bgView
}
func addDisclosureView() {
disclosureButton = UIButton(type: .roundedRect)

View File

@ -9,10 +9,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "103",
"red" : "111",
"alpha" : "1.000",
"blue" : "249",
"green" : "202"
"blue" : "250",
"green" : "175"
}
}
}

View File

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

View File

@ -9,10 +9,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x2D",
"red" : "111",
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xB6"
"blue" : "250",
"green" : "175"
}
}
}

View File

@ -107,6 +107,7 @@ private extension MasterTimelineTableViewCell {
func commonInit() {
theme()
addAccessoryView()
addSubviewAtInit(titleView, hidden: false)
addSubviewAtInit(summaryView, hidden: true)
@ -118,6 +119,12 @@ private extension MasterTimelineTableViewCell {
addSubviewAtInit(starView, hidden: true)
}
func theme() {
let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor
selectedBackgroundView = bgView
}
func addAccessoryView() {
accessoryView = UIImageView(image: AppAssets.chevronRightImage)