PrefUITabs // Update new icons for macOS 10.x.
|
@ -97,6 +97,7 @@ public extension PrefUITabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
var icon: NSImage {
|
var icon: NSImage {
|
||||||
|
let note = "\(rawValue) Preferences" + " \(i18nTitle)"
|
||||||
if #available(macOS 11.0, *) {
|
if #available(macOS 11.0, *) {
|
||||||
let name: String = {
|
let name: String = {
|
||||||
switch self {
|
switch self {
|
||||||
|
@ -120,10 +121,17 @@ public extension PrefUITabs {
|
||||||
return "pc"
|
return "pc"
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
let note = "\(self.rawValue) Preferences"
|
|
||||||
return NSImage(systemSymbolName: name, accessibilityDescription: note) ?? NSImage()
|
return NSImage(systemSymbolName: name, accessibilityDescription: note) ?? NSImage()
|
||||||
}
|
}
|
||||||
let legacyName = "PrefToolbar-\(rawValue)"
|
let legacyName = "PrefToolbar-\(rawValue)"
|
||||||
return NSImage(named: legacyName) ?? NSImage()
|
let matchedImage = NSImage(named: legacyName) ?? NSImage()
|
||||||
|
let newImage = NSImage(size: matchedImage.size)
|
||||||
|
newImage.lockFocus()
|
||||||
|
let imageRect = NSRect(origin: .zero, size: matchedImage.size)
|
||||||
|
matchedImage.draw(in: imageRect, from: imageRect, operation: .sourceOver, fraction: 0.85)
|
||||||
|
newImage.unlockFocus()
|
||||||
|
newImage.isTemplate = true
|
||||||
|
newImage.accessibilityDescription = note
|
||||||
|
return newImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 584 B After Width: | Height: | Size: 860 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 667 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 769 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 956 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 818 B |
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"filename" : "Experiences.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Experiences@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"scale" : "3x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"author" : "xcode",
|
|
||||||
"version" : 1
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 753 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 722 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.1 KiB |