mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 00:58:37 +00:00
Hide MT button from control strip when touch bar is empty
This commit is contained in:
parent
fa63734312
commit
9542e332f5
@ -294,20 +294,23 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
}
|
||||
|
||||
func updateControlStripPresence() {
|
||||
DFRElementSetControlStripPresenceForIdentifier(.controlStripItem, true)
|
||||
let showMtmrButtonOnControlStrip = touchBarContainsAnyItems()
|
||||
DFRElementSetControlStripPresenceForIdentifier(.controlStripItem, showMtmrButtonOnControlStrip)
|
||||
}
|
||||
|
||||
@objc private func presentTouchBar() {
|
||||
if AppSettings.showControlStripState {
|
||||
updateControlStripPresence()
|
||||
presentSystemModal(touchBar, systemTrayItemIdentifier: .controlStripItem)
|
||||
} else {
|
||||
presentSystemModal(touchBar, placement: 1, systemTrayItemIdentifier: .controlStripItem)
|
||||
}
|
||||
updateControlStripPresence()
|
||||
}
|
||||
|
||||
@objc private func dismissTouchBar() {
|
||||
minimizeSystemModal(touchBar)
|
||||
if touchBarContainsAnyItems() {
|
||||
minimizeSystemModal(touchBar)
|
||||
}
|
||||
updateControlStripPresence()
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user