From 39ed73cf5d95b67fb97645bc33d1ab97b806b4d4 Mon Sep 17 00:00:00 2001 From: astar76 Date: Wed, 25 Nov 2026 23:02:37 -0600 Subject: [PATCH] views: drag from empty space to select with a box Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- crates/tunal/examples/xdnd_probe.rs | 39 ++++++++++ crates/tunal/src/folder/mod.rs | 50 ++++++++++++ crates/tunal/src/shell/mod.rs | 6 ++ crates/tunal/ui/app.slint | 4 + crates/tunal/ui/shell/pane.slint | 38 +++++++++ crates/tunal/ui/theme.slint | 4 + crates/tunal/ui/views/details-view.slint | 99 ++++++++++++++++++++++++ crates/tunal/ui/views/grid-view.slint | 36 ++++++++- crates/tunal/ui/views/view-switch.slint | 20 +++++ docs/PROGRESS.md | 5 ++ 11 files changed, 301 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 92dc85c..3b0532e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -91,7 +91,7 @@ Never modify: `PROMPT.md` (the user's brief), the user's other projects under `~ | `cargo run -p tunal -- --gallery --page menu\|dialog --screenshot [--dark] --size 960x640` | open menu + submenu + two toasts, or dialog + indeterminate toast, over a stand-in folder | S005 | | `TUNAL_SETTINGS=<0-7> cargo run -p tunal -- --screenshot --size 1000x700` (`XDG_CONFIG_HOME=`) | settings dialog page over a folder (6 Mouse, 7 Shortcuts); add `TUNAL_KEYS=:` to record that chord on the Shortcuts page (a taken chord shows the conflict row) | S013 | | `TUNAL_DRAG=x1,y1,x2,y2[,hold] TUNAL_REDUCED_MOTION=1 cargo run -p tunal -- --screenshot --size 1200x760` (`XDG_CONFIG_HOME=`) | drags between window points and drops (drop menu) or holds (glow + drag image) before the frame | S014 | -| `Xvfb :97 &` then `env -u WAYLAND_DISPLAY DISPLAY=:97 target/debug/tunal &` and `DISPLAY=:97 target/debug/examples/xdnd_probe x1 y1 x2 y2` (or `in x y `) | X11 native DnD: fake XTEST drag out of the window onto a probe target, or a probe source dropping into the app; Xvfb only. Also `xdnd_probe click x y [count] [gap_ms] [hover_ms] [button]` (2 = middle) and `xdnd_probe key ctrl+t f3 alt+2 …` (focuses the window under the pointer, then presses each chord); screenshot with `import -window root ` | S031 | +| `Xvfb :97 &` then `env -u WAYLAND_DISPLAY DISPLAY=:97 target/debug/tunal &` and `DISPLAY=:97 target/debug/examples/xdnd_probe x1 y1 x2 y2` (or `in x y `) | X11 native DnD: fake XTEST drag out of the window onto a probe target, or a probe source dropping into the app; Xvfb only. Also `xdnd_probe click x y [count] [gap_ms] [hover_ms] [button]` (2 = middle) and `xdnd_probe key ctrl+t f3 alt+2 …` (focuses the window under the pointer, then presses each chord), `xdnd_probe press x1 y1 x2 y2 [hold_ms]` (plain left drag, e.g. a selection box; screenshot while it holds); screenshot with `import -window root ` | S031 | | same, with `SLINT_BACKEND=winit-software` (so `DISPLAY=:97 import -window root ` captures it), then `DISPLAY=:97 target/debug/examples/xdnd_probe click x y [count] [gap_ms] [hover_ms]` | real clicks (XTEST) on a window point after resting `hover_ms` there, e.g. the split toggle with a tooltip showing; Xvfb only | split/tooltip fix | | `TUNAL_APPEARANCE=1 XDG_CONFIG_HOME= cargo run -p tunal -- --screenshot --size 1000x760` | folder appearance dialog for `` (theme icons looked up at once); `cargo run -p tunal-dirmeta --example roundtrip -- ` sets `Icon` in `/.directory` and prints the old values | S015 | | `TUNAL_PLAY=