mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 16:02:24 +00:00
fix(sidebar): the repo group header showed a plain arrow on Windows
The group header is drag-only -- it does nothing on click -- so it hovered under `cursor_grab()`, an open hand that says "pick me up". gpui's Windows backend has no mapping for `CursorStyle::OpenHand`: `load_cursor` matches IBeam, Crosshair, PointingHand, the resize family and OperationNotAllowed, then falls everything else through to `IDC_ARROW`. Win32 has no open-hand system cursor to map it to either. So on Windows the one affordance the header has read as "nothing to do here", while the rows beside it (`cursor_pointer()` -> `IDC_HAND`) looked interactive. Point there instead: not as apt as the open hand, but it is the same cursor the rows use and it does say the header responds. macOS and Linux keep the hand -- both backends implement OpenHand. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
db02cb7ce6
commit
79e2cbc09e
+11
-1
@@ -621,7 +621,17 @@ impl Tty7App {
|
||||
// Unlike a row, a header does nothing on click — its
|
||||
// only affordance is the drag, so the open hand is the
|
||||
// honest hover cursor (it closes once you pick it up).
|
||||
header.cursor_grab().on_drag(DragGroup, {
|
||||
// Windows has no open-hand system cursor, and gpui's
|
||||
// Windows backend falls every unmapped `CursorStyle`
|
||||
// through to `IDC_ARROW` — which reads as "nothing to
|
||||
// do here". Point there instead: it's the same cursor
|
||||
// the rows use, and it at least says "interactive".
|
||||
let header = if cfg!(target_os = "windows") {
|
||||
header.cursor_pointer()
|
||||
} else {
|
||||
header.cursor_grab()
|
||||
};
|
||||
header.on_drag(DragGroup, {
|
||||
let state = self.reorder.clone();
|
||||
let slots = group_slots.clone();
|
||||
move |_drag, grab, _window, cx| {
|
||||
|
||||
Reference in New Issue
Block a user