mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added an option to pause/resume the application (#834)
This commit is contained in:
@@ -13,6 +13,7 @@ import Cocoa
|
||||
|
||||
public protocol Settings_p: NSView {
|
||||
var toggleCallback: () -> Void { get set }
|
||||
func setState(_ newState: Bool)
|
||||
}
|
||||
|
||||
public protocol Settings_v: NSView {
|
||||
@@ -214,6 +215,10 @@ open class Settings: NSStackView, Settings_p {
|
||||
}
|
||||
}
|
||||
|
||||
public func setState(_ newState: Bool) {
|
||||
toggleNSControlState(self.enableControl, state: newState ? .on : .off)
|
||||
}
|
||||
|
||||
private func loadWidget() {
|
||||
self.loadModuleSettings()
|
||||
self.loadWidgetSettings()
|
||||
|
||||
Reference in New Issue
Block a user