mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Dynamic Popup/Dropdown shortcut
This commit is contained in:
parent
5321352184
commit
e29745f8f4
6 changed files with 139 additions and 19 deletions
|
|
@ -63,7 +63,25 @@ struct DynamicIslandHeader: View {
|
|||
|
||||
if Defaults[.enableClipboardManager] && Defaults[.showClipboardIcon] {
|
||||
Button(action: {
|
||||
showClipboardPopover.toggle()
|
||||
// Use the same smart logic as the keyboard shortcut
|
||||
let displayMode = Defaults[.clipboardDisplayMode]
|
||||
let shouldUseWindow: Bool
|
||||
|
||||
switch displayMode {
|
||||
case .window:
|
||||
shouldUseWindow = true
|
||||
case .popover:
|
||||
shouldUseWindow = false
|
||||
case .auto:
|
||||
// For header button clicks, prefer popover since user is already interacting with notch
|
||||
shouldUseWindow = false
|
||||
}
|
||||
|
||||
if shouldUseWindow {
|
||||
ClipboardWindowManager.shared.toggleClipboardWindow()
|
||||
} else {
|
||||
showClipboardPopover.toggle()
|
||||
}
|
||||
}) {
|
||||
Capsule()
|
||||
.fill(.black)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue