From a5cfeb1f123e1eef3a13ed7a313013e7f48da4c3 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 28 Apr 2019 15:11:02 -0500 Subject: [PATCH] Make smart feed icon color configurable --- Shared/SmartFeeds/PseudoFeed.swift | 2 +- iOS/AppAssets.swift | 13 ++++++++---- .../smartFeedColor.colorset/Contents.json | 20 ++++++++++++++++++ .../Contents.json | 0 .../cog.pdf | Bin 5 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 iOS/Resources/Assets.xcassets/smartFeedColor.colorset/Contents.json rename iOS/Resources/Assets.xcassets/{cogImage.imageset => smartFeedImage.imageset}/Contents.json (100%) rename iOS/Resources/Assets.xcassets/{cogImage.imageset => smartFeedImage.imageset}/cog.pdf (100%) diff --git a/Shared/SmartFeeds/PseudoFeed.swift b/Shared/SmartFeeds/PseudoFeed.swift index 5f3f5b79c..4d2e323ad 100644 --- a/Shared/SmartFeeds/PseudoFeed.swift +++ b/Shared/SmartFeeds/PseudoFeed.swift @@ -40,7 +40,7 @@ protocol PseudoFeed: class, DisplayNameProvider, UnreadCountProvider, SmallIconP } private var smartFeedIcon: UIImage = { - return AppAssets.cogImage + return AppAssets.smartFeedImage }() extension PseudoFeed { diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index 57e7cdded..541494ccd 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -32,10 +32,6 @@ struct AppAssets { return image.maskWithColor(color: AppAssets.chevronDisclosureColor)! }() - static var cogImage: RSImage = { - return RSImage(named: "cogImage")! - }() - static var feedImage: RSImage = { return RSImage(named: "rssImage")! }() @@ -57,6 +53,15 @@ struct AppAssets { return UIColor(named: "selectionBackgroundColor")! }() + static var smartFeedColor: UIColor = { + return UIColor(named: "smartFeedColor")! + }() + + static var smartFeedImage: RSImage = { + let image = RSImage(named: "smartFeedImage")! + return image.maskWithColor(color: AppAssets.smartFeedColor)! + }() + static var starColor: UIColor = { return UIColor(named: "starColor")! }() diff --git a/iOS/Resources/Assets.xcassets/smartFeedColor.colorset/Contents.json b/iOS/Resources/Assets.xcassets/smartFeedColor.colorset/Contents.json new file mode 100644 index 000000000..76ddab11e --- /dev/null +++ b/iOS/Resources/Assets.xcassets/smartFeedColor.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "85", + "alpha" : "1.000", + "blue" : "85", + "green" : "85" + } + } + } + ] +} \ No newline at end of file diff --git a/iOS/Resources/Assets.xcassets/cogImage.imageset/Contents.json b/iOS/Resources/Assets.xcassets/smartFeedImage.imageset/Contents.json similarity index 100% rename from iOS/Resources/Assets.xcassets/cogImage.imageset/Contents.json rename to iOS/Resources/Assets.xcassets/smartFeedImage.imageset/Contents.json diff --git a/iOS/Resources/Assets.xcassets/cogImage.imageset/cog.pdf b/iOS/Resources/Assets.xcassets/smartFeedImage.imageset/cog.pdf similarity index 100% rename from iOS/Resources/Assets.xcassets/cogImage.imageset/cog.pdf rename to iOS/Resources/Assets.xcassets/smartFeedImage.imageset/cog.pdf