Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ViMac-Swift/Modes/HintModeController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ class HintModeController: ModeController {
// so a click is performed there
if element.role == "AXLink" {
return NSPoint(
// tiny offset in case clicking on the edge of the element does nothing
x: element.frame.origin.x + 5,
y: element.frame.origin.y + element.frame.height - 5
// inset from corner by 10 pixels, but no more than halfway
x: element.frame.origin.x + min(element.frame.width / 2, 10),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not overshooting when jumping by a magic number is a great idea

y: element.frame.origin.y + element.frame.height - min(element.frame.height / 2, 10)
)
}
return GeometryUtils.center(element.frame)
Expand Down