Skip to content

Commit

Permalink
chore: use preferred screen for preview instead of screen 0
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Nov 4, 2024
1 parent 88c1595 commit 649a5cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/logic/NSScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension NSScreen {
preferred_() ?? NSScreen.screens.first!
}

static func preferred_() -> NSScreen? {
private static func preferred_() -> NSScreen? {
switch Preferences.showOnScreen {
case .includingMouse: return withMouse()
case .active: return NSScreen.active()
Expand Down
2 changes: 1 addition & 1 deletion src/logic/Windows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class Windows {
}
App.app.previewPanel.setPreview(preview)
var frame = NSRect(origin: position, size: size)
frame.origin.y = NSScreen.screens[0].frame.maxY - frame.maxY
frame.origin.y = NSScreen.preferred().frame.maxY - frame.maxY
App.app.previewPanel.setFrame(frame, display: false)
App.app.previewPanel.order(.below, relativeTo: App.app.thumbnailsPanel.windowNumber)
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/LogManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class LogManager {
#else
console.minLevel = .error
file.minLevel = .error
// logger.addDestination(console)
// logger.addDestination(file)
#endif

Expand Down

0 comments on commit 649a5cb

Please sign in to comment.