From b413bc5a43fe8c96beccbbac64a6affe0167502d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 9 Sep 2026 17:35:59 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style(app):=20the=20grab=20band?= =?UTF-8?q?=20hangs=20on=20the=20line=20the=20eye=20sees?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Centred on the 6 px strip, the band reached only 3 px past the panel edge that reads as the seam -- the press one row into the bench still missed. GRAB_W 12 -> 14, hung one row above the strip: the band now runs from the visible line minus 6 to plus 8, and the original miss grabs. --- crates/app/src/interact.rs | 8 +++++--- crates/app/src/layout.rs | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/app/src/interact.rs b/crates/app/src/interact.rs index 905c022..950d60d 100644 --- a/crates/app/src/interact.rs +++ b/crates/app/src/interact.rs @@ -248,7 +248,9 @@ pub(crate) fn drag_scrim(cx: &mut Context) -> Div { /// first move -- so the lit line has to come from the model, not from `hover`. /// /// What the *hand* aims at is wider than what the eye is given: the press and -/// the resize cursor live on a [`GRAB_W`] band centred on the strip, mounted +/// the resize cursor live on a [`GRAB_W`] band centred on the *line the eye +/// sees* -- one row above the strip, so it reaches past the panel edge the +/// strip stands in front of rather than being centred on the strip -- mounted /// absolutely so it overlays its neighbours instead of pushing them (the strip /// keeps its [`SPLIT_W`] of layout, and `layout::split_drag_size` keeps /// answering in strip coordinates). A 6 px target missed by 5 px is a resize @@ -285,14 +287,14 @@ pub(crate) fn divider(split: Split, held: bool, cx: &mut Context) -> Div .when(across, |d| { d.left_0() .right_0() - .top(px((SPLIT_W - GRAB_W) / 2.)) + .top(px(-1.)) .h(px(GRAB_W)) .cursor_row_resize() }) .when(!across, |d| { d.top_0() .bottom_0() - .left(px((SPLIT_W - GRAB_W) / 2.)) + .left(px(-1.)) .w(px(GRAB_W)) .cursor_col_resize() }) diff --git a/crates/app/src/layout.rs b/crates/app/src/layout.rs index 55f6c9d..50f4949 100644 --- a/crates/app/src/layout.rs +++ b/crates/app/src/layout.rs @@ -295,8 +295,10 @@ pub(crate) const SPLIT_W: f32 = 6.; /// have -- the lead's own press one row into the bench missed the seam by 5 px /// and focused the bench instead ("panes should be enlargable and shrinkable", /// of panes that already resized). 12 px is the ±6 px of aim every editor's -/// dividers allow. -pub(crate) const GRAB_W: f32 = 12.; +/// dividers allow, and it is hung one row above the strip rather than centred +/// on it: what a hand aims at is the line it can see (the panel's own edge at +/// the strip's far side), not the six transparent pixels in front of it. +pub(crate) const GRAB_W: f32 = 14.; /// The most of the window one side column may be dragged to. A third each, so /// the picture keeps the middle at every size -- the rule [`library_w`] and