mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added support for new m3 chips
This commit is contained in:
@@ -65,12 +65,8 @@ public class SpeedWidget: WidgetWrapper {
|
||||
public init(title: String, config: NSDictionary?, preview: Bool = false) {
|
||||
let widgetTitle: String = title
|
||||
if config != nil {
|
||||
if let symbols = config!["Symbols"] as? [String] {
|
||||
self.symbols = symbols
|
||||
}
|
||||
if let icon = config!["Icon"] as? String {
|
||||
self.icon = icon
|
||||
}
|
||||
if let symbols = config!["Symbols"] as? [String] { self.symbols = symbols }
|
||||
if let icon = config!["Icon"] as? String { self.icon = icon }
|
||||
}
|
||||
|
||||
super.init(.speed, title: widgetTitle, frame: CGRect(
|
||||
@@ -79,7 +75,6 @@ public class SpeedWidget: WidgetWrapper {
|
||||
width: width,
|
||||
height: Constants.Widget.height - (2*Constants.Widget.margin.y)
|
||||
))
|
||||
|
||||
self.canDrawConcurrently = true
|
||||
|
||||
if !preview {
|
||||
@@ -130,7 +125,6 @@ public class SpeedWidget: WidgetWrapper {
|
||||
|
||||
private func drawOneRow(_ dirtyRect: NSRect) -> CGFloat {
|
||||
var width: CGFloat = Constants.Widget.margin.x
|
||||
|
||||
let downloadIconColor = self.downloadValue >= 1_024 ? self.downloadColor : self.noActivityColor
|
||||
let uploadIconColor = self.uploadValue >= 1_024 ? self.uploadColor : self.noActivityColor
|
||||
|
||||
|
||||
@@ -24,10 +24,16 @@ public enum Platform: String, Codable {
|
||||
case m2Max
|
||||
case m2Ultra
|
||||
|
||||
case m3
|
||||
case m3Pro
|
||||
case m3Max
|
||||
case m3Ultra
|
||||
|
||||
public static var apple: [Platform] {
|
||||
return [
|
||||
.m1, .m1Pro, .m1Max, .m1Ultra,
|
||||
.m2, .m2Pro, .m2Max, .m2Ultra
|
||||
.m2, .m2Pro, .m2Max, .m2Ultra,
|
||||
.m3, .m3Pro, .m3Max, .m3Ultra
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user