Add the ability to customize the smartfeed and folder color option using the Asset catalog

This commit is contained in:
Maurice Parker 2019-09-11 11:26:22 -05:00
parent 856006a19f
commit 93f4b29274
5 changed files with 91 additions and 11 deletions

View File

@ -76,8 +76,13 @@ struct AppAssets {
return UIImage(systemName: "arrowtriangle.up.circle")!
}()
static var masterFolderColor: UIColor = {
return UIColor(named: "masterFolderColor")!
}()
static var masterFolderImage: UIImage = {
return UIImage(systemName: "folder.fill")!
let image = UIImage(systemName: "folder.fill")!
return image.withTintColor(AppAssets.masterFolderColor, renderingMode: .alwaysOriginal)
}()
static var moreImage: UIImage = {
@ -109,7 +114,8 @@ struct AppAssets {
}()
static var smartFeedImage: UIImage = {
return UIImage(systemName: "gear")!
let image = UIImage(systemName: "gear")!
return image.withTintColor(AppAssets.smartFeedColor, renderingMode: .alwaysOriginal)
}()
static var starColor: UIColor = {

View File

@ -0,0 +1,38 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.267",
"alpha" : "1.000",
"blue" : "0.886",
"green" : "0.565"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.549",
"alpha" : "1.000",
"blue" : "0.980",
"green" : "0.749"
}
}
}
]
}

View File

@ -9,10 +9,28 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "85",
"red" : "0x44",
"alpha" : "1.000",
"blue" : "85",
"green" : "85"
"blue" : "0xE2",
"green" : "0x90"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x8C",
"alpha" : "1.000",
"blue" : "0xFA",
"green" : "0xBF"
}
}
}

View File

@ -27,10 +27,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.267",
"red" : "0x44",
"alpha" : "1.000",
"blue" : "0.886",
"green" : "0.565"
"blue" : "0xE1",
"green" : "0x90"
}
}
}

View File

@ -9,10 +9,28 @@
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "82",
"red" : "0x44",
"alpha" : "1.000",
"blue" : "205",
"green" : "133"
"blue" : "0xE2",
"green" : "0x90"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.549",
"alpha" : "1.000",
"blue" : "0.980",
"green" : "0.749"
}
}
}