mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update HUDs to show up betterdisplay
This commit is contained in:
parent
dd726d6401
commit
cead5f9ce8
7 changed files with 66 additions and 28 deletions
|
|
@ -136,13 +136,13 @@ final class VerticalHUDWindowManager {
|
|||
windows.removeAll()
|
||||
}
|
||||
|
||||
func show(type: SneakContentType, value: CGFloat, icon: String = "") {
|
||||
func show(type: SneakContentType, value: CGFloat, icon: String = "", onScreen targetScreen: NSScreen? = nil) {
|
||||
guard Defaults[.enableVerticalHUD] else { return }
|
||||
|
||||
let screens = NSScreen.screens
|
||||
let screens = targetScreen.map { [$0] } ?? NSScreen.screens
|
||||
guard !screens.isEmpty else { return }
|
||||
|
||||
// Show on all screens
|
||||
// Show on target screen(s)
|
||||
for screen in screens {
|
||||
let windowContext = ensureWindow(for: type, screen: screen)
|
||||
updateContent(window: windowContext, type: type, value: value, icon: icon)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue