feat: added support for new m3 chips

This commit is contained in:
Serhiy Mytrovtsiy
2023-11-14 19:17:22 +01:00
parent b988b86429
commit e5628bf468
2 changed files with 9 additions and 9 deletions

View File

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

View File

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