Don't show a background on symbol images
This commit is contained in:
parent
c5ec93e8b5
commit
1fba0ed247
|
@ -122,15 +122,11 @@ struct AppAssets {
|
|||
}()
|
||||
|
||||
static var searchFeedImage: IconImage = {
|
||||
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
|
||||
}()
|
||||
|
||||
static var smartFeedImage: RSImage = {
|
||||
return RSImage(named: NSImage.smartBadgeTemplateName)!
|
||||
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
|
||||
}()
|
||||
|
||||
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 = {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -29,9 +29,3 @@ protocol PseudoFeed: class, Feed, SmallIconProvider {
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
extension PseudoFeed {
|
||||
var smallIcon: RSImage? {
|
||||
return AppAssets.smartFeedImage
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue