mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 17:38:38 +00:00
fix tests
This commit is contained in:
parent
afbca86194
commit
f928ac2aef
@ -48,20 +48,6 @@ class SupportedTypesHolder {
|
||||
|
||||
"delete": { _ in return (item: .staticButton(title: "del"), action: .keyPress(keycode: 117), longAction: .none, parameters: [:])},
|
||||
|
||||
"brightnessUp": { _ in
|
||||
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessUp"))
|
||||
return (item: .staticButton(title: ""), action: .custom(closure: {
|
||||
sharedBrightnessController.increase()
|
||||
}), longAction: .none, parameters: [.image: imageParameter])
|
||||
},
|
||||
|
||||
"brightnessDown": { _ in
|
||||
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessDown"))
|
||||
return (item: .staticButton(title: ""), action: .custom(closure: {
|
||||
sharedBrightnessController.decrease()
|
||||
}), longAction: .none, parameters: [.image: imageParameter])
|
||||
},
|
||||
|
||||
"illuminationUp": { _ in
|
||||
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "ill_up"))
|
||||
return (item: .staticButton(title: ""), action: .hidKey(keycode: NX_KEYTYPE_ILLUMINATION_UP), longAction: .none, parameters: [.image: imageParameter])
|
||||
|
||||
@ -104,6 +104,20 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
}), longAction: .none, parameters: [.width: .width(30), .image: .image(source: (NSImage(named: NSImage.stopProgressFreestandingTemplateName))!)])
|
||||
}
|
||||
|
||||
SupportedTypesHolder.sharedInstance.register(typename: "brightnessUp") { _ in
|
||||
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessUp"))
|
||||
return (item: .staticButton(title: ""), action: .custom(closure: {
|
||||
sharedBrightnessController.increase()
|
||||
}), longAction: .none, parameters: [.image: imageParameter])
|
||||
}
|
||||
|
||||
SupportedTypesHolder.sharedInstance.register(typename: "brightnessDown") { _ in
|
||||
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessDown"))
|
||||
return (item: .staticButton(title: ""), action: .custom(closure: {
|
||||
sharedBrightnessController.decrease()
|
||||
}), longAction: .none, parameters: [.image: imageParameter])
|
||||
}
|
||||
|
||||
if let blackListed = UserDefaults.standard.stringArray(forKey: "com.toxblh.mtmr.blackListedApps") {
|
||||
self.blacklistAppIdentifiers = blackListed
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user