cursor
This commit is contained in:
@@ -104,3 +104,4 @@ How the suites are organised and how to run one: see the Testing section of the
|
||||
- **Config.** `files.followGitignore` defaults to **false** (the main-process value). There is no CSS layer: code font and size come from config/Typography.
|
||||
- **One file, no Original.** The editor deliberately has no tabs and no Original mode. `git.defaultDiffMode: "original"` in an older config decodes as `"updated"`.
|
||||
- **SwiftTerm** has no line-height or letter-spacing setting, so `terminal.lineHeight`/`letterSpacing` from the config are ignored.
|
||||
- **Pointer.** `Components/PointerPolicy.swift` is the one rule: I-beam, pointing hand or arrow. Text views conform to `PointerTextTarget`; a SwiftUI button or row gets the hand with `.pointerHand()` on the exact view a left click acts on, never on a container. Its region view takes no clicks and reads `\.isEnabled`, `disabledLook` and `\.pointerLayer` (`.overlay` under `OverlayHost` and the ⇧⌘O list), so a disabled button and every column behind an overlay keep the arrow. `updateCursor` asks the `PointerOwner` under the mouse first, so a text field inside a clickable row keeps the I-beam. AppKit hands a cursor update to the hit view, and a region view takes no hits, so `NSHostingView` would set the arrow; `PointerPolicy.installCursorUpdateMonitor()` (called at launch) swallows every cursor update in the key window, passes every mouse move on untouched, and for both runs `updateCursor` once afterwards (`scheduleUpdate`, coalesced per window). Inside an event SwiftUI's hit test returns its root view, so nothing calls `updateCursor` from inside an event, and the deferred call never resets cursor rects, which would fire new updates. Region views and the terminals keep a `PointerTracker` area (cursor update, enter, exit) so AppKit still sends an update when the mouse crosses their edge.
|
||||
|
||||
@@ -214,6 +214,16 @@ Inside the overlay:
|
||||
- When nothing matches, each column shows a brief no-results message.
|
||||
- `Esc` closes the overlay. The respected excludes are the same as the Explorer (`files.exclude` and, when on, gitignore).
|
||||
|
||||
### Mouse pointer
|
||||
|
||||
The pointer shows what a left click does at that spot. It depends only on what lies under the mouse.
|
||||
|
||||
- **Pointing hand** only where a left click runs an action: buttons (title-bar toggles and tools, `?`, Preview, Diff, Commit, Push, stage `+` / unstage `−`, Stage all / Unstage all, dialog buttons, Collapse, search chips), clickable rows (Git file rows, Explorer rows, search results, recent files and projects, launcher rows, symbol popup rows, context-menu items) and the project name in the title bar. Never on a view that only reacts to a right-click, a tooltip or hover.
|
||||
- **I-beam** where a click places a caret or starts a selection: the code (also below the last line), the Markdown preview, both terminals, the commit message and every overlay input.
|
||||
- **Arrow** everywhere else: labels, headers, folder labels, the gutter, the status bar, scrims, toasts, empty states, and a disabled button such as Commit with nothing staged.
|
||||
- With an overlay open, every column behind it shows the arrow; the overlay's own buttons, rows and inputs keep theirs.
|
||||
- A splitter shows a resize arrow; `Cmd` over a known PHP class name in the code shows the hand. No other pointers are used.
|
||||
|
||||
### Pane resizing
|
||||
|
||||
Dragging any splitter resizes the adjacent panes. Positions persist across launches.
|
||||
|
||||
@@ -87,6 +87,11 @@ A Helder window holds one project. It has a title bar on top, four columns in th
|
||||
- In the Git and Explorer columns, `Up` and `Down` move the row cursor and `Return` opens the row. See [Git](git.md) and [Explorer](explorer.md).
|
||||
- Clicking a row in Git or Explorer takes the keyboard out of a text field in another column.
|
||||
|
||||
### The mouse pointer
|
||||
- A pointing hand means a left click runs an action: a button, a clickable row, the project name.
|
||||
- An I-beam means a click places the cursor or selects text: the code, the Markdown preview, the terminals and every input.
|
||||
- Everywhere else the pointer is an arrow, also over a disabled button and over the columns behind an open dialog or search.
|
||||
|
||||
### Refresh (`Cmd+R`)
|
||||
- Re-reads git, the file tree and the open file from disk. The disk wins over unsaved edits in the open file.
|
||||
- Every column flashes lighter for a moment, so you can see the refresh happened even when nothing changed.
|
||||
|
||||
Reference in New Issue
Block a user