PrefUITabs // Update new icons for macOS 10.x.

This commit is contained in:
ShikiSuen 2024-02-10 17:47:03 +08:00
parent 4af0d515dc
commit b8f5077198
22 changed files with 10 additions and 24 deletions

View File

@ -97,6 +97,7 @@ public extension PrefUITabs {
}
var icon: NSImage {
let note = "\(rawValue) Preferences" + " \(i18nTitle)"
if #available(macOS 11.0, *) {
let name: String = {
switch self {
@ -120,10 +121,17 @@ public extension PrefUITabs {
return "pc"
}
}()
let note = "\(self.rawValue) Preferences"
return NSImage(systemSymbolName: name, accessibilityDescription: note) ?? NSImage()
}
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
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 818 B

View File

@ -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
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB