feat: added an option to pause/resume the application (#834)

This commit is contained in:
Serhiy Mytrovtsiy
2022-09-10 12:08:46 +02:00
parent 347b606972
commit 4056b61616
8 changed files with 213 additions and 7 deletions

View File

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