mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
lang: added translations for internet status notifications
This commit is contained in:
@@ -231,25 +231,19 @@ public class BarChart: WidgetWrapper {
|
||||
}
|
||||
guard isDifferent else { return }
|
||||
self._value = newValue
|
||||
DispatchQueue.main.async(execute: {
|
||||
self.display()
|
||||
})
|
||||
self.redraw()
|
||||
}
|
||||
|
||||
public func setPressure(_ newPressureLevel: RAMPressure) {
|
||||
guard self._pressureLevel != newPressureLevel else { return }
|
||||
self._pressureLevel = newPressureLevel
|
||||
DispatchQueue.main.async(execute: {
|
||||
self.display()
|
||||
})
|
||||
self.redraw()
|
||||
}
|
||||
|
||||
public func setColorZones(_ newColorZones: colorZones) {
|
||||
guard self._colorZones != newColorZones else { return }
|
||||
self._colorZones = newColorZones
|
||||
DispatchQueue.main.async(execute: {
|
||||
self.display()
|
||||
})
|
||||
self.redraw()
|
||||
}
|
||||
|
||||
// MARK: - Settings
|
||||
@@ -288,7 +282,7 @@ public class BarChart: WidgetWrapper {
|
||||
@objc private func toggleLabel(_ sender: NSControl) {
|
||||
self.labelState = controlState(sender)
|
||||
Store.shared.set(key: "\(self.title)_\(self.type.rawValue)_label", value: self.labelState)
|
||||
self.display()
|
||||
self.redraw()
|
||||
}
|
||||
|
||||
@objc private func toggleBox(_ sender: NSControl) {
|
||||
@@ -301,7 +295,7 @@ public class BarChart: WidgetWrapper {
|
||||
Store.shared.set(key: "\(self.title)_\(self.type.rawValue)_frame", value: self.frameState)
|
||||
}
|
||||
|
||||
self.display()
|
||||
self.redraw()
|
||||
}
|
||||
|
||||
@objc private func toggleFrame(_ sender: NSControl) {
|
||||
@@ -314,7 +308,7 @@ public class BarChart: WidgetWrapper {
|
||||
Store.shared.set(key: "\(self.title)_\(self.type.rawValue)_box", value: self.boxState)
|
||||
}
|
||||
|
||||
self.display()
|
||||
self.redraw()
|
||||
}
|
||||
|
||||
@objc private func toggleColor(_ sender: NSMenuItem) {
|
||||
@@ -324,6 +318,6 @@ public class BarChart: WidgetWrapper {
|
||||
}
|
||||
|
||||
Store.shared.set(key: "\(self.title)_\(self.type.rawValue)_color", value: key)
|
||||
self.display()
|
||||
self.redraw()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user