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 = {
|
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 = {
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -29,9 +29,3 @@ protocol PseudoFeed: class, Feed, SmallIconProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extension PseudoFeed {
|
|
||||||
var smallIcon: RSImage? {
|
|
||||||
return AppAssets.smartFeedImage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue