Don't show a background on symbol images

This commit is contained in:
Maurice Parker 2020-08-08 17:27:32 -05:00
parent c5ec93e8b5
commit 1fba0ed247
3 changed files with 6 additions and 17 deletions

View File

@ -122,15 +122,11 @@ struct AppAssets {
}() }()
static var searchFeedImage: IconImage = { static var searchFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!) return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}() }()
static var smartFeedImage: RSImage = {
return RSImage(named: NSImage.smartBadgeTemplateName)!
}()
static var starredFeedImage: IconImage = { static var starredFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!) return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}() }()
static var timelineStar: RSImage! = { static var timelineStar: RSImage! = {
@ -138,11 +134,11 @@ struct AppAssets {
}() }()
static var todayFeedImage: IconImage = { static var todayFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!) return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}() }()
static var unreadFeedImage: IconImage = { static var unreadFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!) return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}() }()
static var swipeMarkReadImage: RSImage = { static var swipeMarkReadImage: RSImage = {

View File

@ -84,9 +84,8 @@ final class IconView: NSView {
} }
override func draw(_ dirtyRect: NSRect) { override func draw(_ dirtyRect: NSRect) {
guard hasExposedVerticalBackground || !isDisconcernable else { guard !(iconImage?.isSymbol ?? true) else { return }
return guard hasExposedVerticalBackground || !isDisconcernable else { return }
}
let color = NSApplication.shared.effectiveAppearance.isDarkMode ? IconView.darkBackgroundColor : IconView.lightBackgroundColor let color = NSApplication.shared.effectiveAppearance.isDarkMode ? IconView.darkBackgroundColor : IconView.lightBackgroundColor
color.set() color.set()

View File

@ -29,9 +29,3 @@ protocol PseudoFeed: class, Feed, SmallIconProvider {
} }
#endif #endif
extension PseudoFeed {
var smallIcon: RSImage? {
return AppAssets.smartFeedImage
}
}