mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 17:08:39 +00:00
fix setting width for borderless buttons
This commit is contained in:
parent
9a34d5bca0
commit
21bc525a04
@ -208,15 +208,15 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
barItem = InputSourceBarItem(identifier: identifier, onTap: action, onLongTap: longAction)
|
||||
}
|
||||
|
||||
if case .width(let value)? = item.additionalParameters[.width], let widthBarItem = barItem as? CanSetWidth {
|
||||
widthBarItem.setWidth(value: value)
|
||||
}
|
||||
if case .bordered(let bordered)? = item.additionalParameters[.bordered], let item = barItem as? CustomButtonTouchBarItem {
|
||||
item.isBordered = bordered
|
||||
}
|
||||
if case .background(let color)? = item.additionalParameters[.background], let item = barItem as? CustomButtonTouchBarItem {
|
||||
item.backgroundColor = color
|
||||
}
|
||||
if case .width(let value)? = item.additionalParameters[.width], let widthBarItem = barItem as? CanSetWidth {
|
||||
widthBarItem.setWidth(value: value)
|
||||
}
|
||||
if case .image(let source)? = item.additionalParameters[.image], let item = barItem as? CustomButtonTouchBarItem {
|
||||
let button = item.button!
|
||||
button.imageScaling = .scaleProportionallyDown
|
||||
|
||||
Loading…
Reference in New Issue
Block a user