mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: added alternative menu icons for macOS 11 (#1252)
This commit is contained in:
@@ -39,10 +39,11 @@ public struct module_c {
|
||||
if let state = dict["State"] as? Bool {
|
||||
self.defaultState = state
|
||||
}
|
||||
if let symbol = dict["Symbol"] as? String {
|
||||
if #available(macOS 11.0, *) {
|
||||
self.icon = NSImage(systemSymbolName: symbol, accessibilityDescription: nil)
|
||||
}
|
||||
if let symbol = dict["Symbol"] as? String, #available(macOS 11.0, *) {
|
||||
self.icon = NSImage(systemSymbolName: symbol, accessibilityDescription: nil)
|
||||
}
|
||||
if self.icon == nil, #available(macOS 11.0, *), let symbol = dict["AlternativeSymbol"] as? String {
|
||||
self.icon = NSImage(systemSymbolName: symbol, accessibilityDescription: nil)
|
||||
}
|
||||
|
||||
if let widgetsDict = dict["Widgets"] as? NSDictionary {
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<false/>
|
||||
<key>Symbol</key>
|
||||
<string>point.3.filled.connected.trianglepath.dotted</string>
|
||||
<key>AlternativeSymbol</key>
|
||||
<string>scale.3d</string>
|
||||
<key>Widgets</key>
|
||||
<dict>
|
||||
<key>label</key>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<true/>
|
||||
<key>Symbol</key>
|
||||
<string>cpu.fill</string>
|
||||
<key>AlternativeSymbol</key>
|
||||
<string>cpu</string>
|
||||
<key>Widgets</key>
|
||||
<dict>
|
||||
<key>label</key>
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
<key>State</key>
|
||||
<false/>
|
||||
<key>Symbol</key>
|
||||
<string>fanblades</string>
|
||||
<string>fanblades.fill</string>
|
||||
<key>AlternativeSymbol</key>
|
||||
<string>thermometer.sun</string>
|
||||
<key>Widgets</key>
|
||||
<dict>
|
||||
<key>label</key>
|
||||
|
||||
Reference in New Issue
Block a user