mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-20 06:20:32 +00:00
macOS: fix quicklook position
Account for padding and properly calculate text baseline, since that is the position that the NSView `showDefinition` method ultimately needs.
This commit is contained in:
@@ -864,7 +864,7 @@ extension Ghostty {
|
||||
}
|
||||
|
||||
// Ghostty coordinate system is top-left, convert to bottom-left for AppKit
|
||||
let pt = NSMakePoint(info.tl_px_x - 2, frame.size.height - info.tl_px_y + 2)
|
||||
let pt = NSMakePoint(info.tl_px_x, frame.size.height - info.tl_px_y)
|
||||
let str = NSAttributedString.init(string: text, attributes: attributes)
|
||||
self.showDefinition(for: str, at: pt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user