fix(selection): a fast press-drag starts the selection window at once

A left drag only became a lasso/window after the button had been held
150 ms, however far the cursor had moved. A fast flick released inside
that delay read as a click and armed a click-click box instead. A press
that has moved more than 12 px is now a drag at once; the delay still
keeps small movements of a click from becoming one. (#1808)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-15 16:09:55 +03:00
1 parent 859070403c
commit 12587339d8
2 files changed
+11 -2

No files matched your search

+3
View File
@@ -378,6 +378,9 @@ use iced::{mouse, Point, Task, Theme};
use std::sync::Arc;
pub(super) const POLY_START_DELAY_MS: u128 = 150;
/// Squared screen distance (12 px) past which a left press is a drag
/// without waiting for `POLY_START_DELAY_MS`.
pub(super) const DRAG_START_FAST_PX2: f32 = 144.0;
pub(super) const VARIES_LABEL: &str = "*VARIES*";
// ── File-open progress ─────────────────────────────────────────────────────