Use SF Symbols for icons in the Sidebar when on Big Sur Issue #2323

This commit is contained in:
Maurice Parker 2020-08-08 18:15:45 -05:00
parent 8c48fb8cc6
commit f23ebbd8db
4 changed files with 89 additions and 7 deletions

View File

@ -118,7 +118,13 @@ struct AppAssets {
}()
static var masterFolderImage: IconImage = {
return IconImage(RSImage(named: NSImage.folderName)!)
if #available(macOS 10.16, *) {
let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)!
let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!)
return IconImage(coloredImage, isSymbol: true)
} else {
return IconImage(RSImage(named: NSImage.folderName)!)
}
}()
static var searchFeedImage: IconImage = {
@ -126,7 +132,13 @@ struct AppAssets {
}()
static var starredFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
if #available(macOS 10.16, *) {
let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
let coloredImage = image.tinted(with: NSColor(named: "StarColor")!)
return IconImage(coloredImage, isSymbol: true)
} else {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}
}()
static var timelineStar: RSImage! = {
@ -134,11 +146,23 @@ struct AppAssets {
}()
static var todayFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
if #available(macOS 10.16, *) {
let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!
let coloredImage = image.tinted(with: .orange)
return IconImage(coloredImage, isSymbol: true)
} else {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}
}()
static var unreadFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
if #available(macOS 10.16, *) {
let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!)
return IconImage(coloredImage, isSymbol: true)
} else {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true)
}
}()
static var swipeMarkReadImage: RSImage = {

View File

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.933",
"green" : "0.416",
"red" : "0.031"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.957",
"green" : "0.620",
"red" : "0.369"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}

View File

@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.204",
"green" : "0.776",
"red" : "0.976"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}