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 = {
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 = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}()
static var timelineStar: RSImage! = {
@ -138,11 +134,11 @@ struct AppAssets {
}()
static var todayFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}()
static var unreadFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}()
static var swipeMarkReadImage: RSImage = {

View File

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

View File

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