forge
Explore
Log in

Don't you dare go Hollow

The grab band hangs on the line the eye sees

Browse files at this commit

b413bc5a43fe8c96beccbbac64a6affe0167502dAhmet Kaan GümüşParent: cebb935
  • style
    • the grab band hangs on the line the eye sees
Show full message
🎨 style(app): the grab band hangs on the line the eye sees

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.rsmodified+5 -3
@@ -248,7 +248,9 @@ pub(crate) fn drag_scrim(cx: &mut Context<Player>) -> Div {
248248 /// first move -- so the lit line has to come from the model, not from `hover`.
249249 ///
250250 /// What the *hand* aims at is wider than what the eye is given: the press and
251-/// the resize cursor live on a [`GRAB_W`] band centred on the strip, mounted
251+/// the resize cursor live on a [`GRAB_W`] band centred on the *line the eye
252+/// sees* -- one row above the strip, so it reaches past the panel edge the
253+/// strip stands in front of rather than being centred on the strip -- mounted
252254 /// absolutely so it overlays its neighbours instead of pushing them (the strip
253255 /// keeps its [`SPLIT_W`] of layout, and `layout::split_drag_size` keeps
254256 /// 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<Player>) -> Div
285287 .when(across, |d| {
286288 d.left_0()
287289 .right_0()
288- .top(px((SPLIT_W - GRAB_W) / 2.))
290+ .top(px(-1.))
289291 .h(px(GRAB_W))
290292 .cursor_row_resize()
291293 })
292294 .when(!across, |d| {
293295 d.top_0()
294296 .bottom_0()
295- .left(px((SPLIT_W - GRAB_W) / 2.))
297+ .left(px(-1.))
296298 .w(px(GRAB_W))
297299 .cursor_col_resize()
298300 })
crates/app/src/layout.rsmodified+4 -2
@@ -295,8 +295,10 @@ pub(crate) const SPLIT_W: f32 = 6.;
295295 /// have -- the lead's own press one row into the bench missed the seam by 5 px
296296 /// and focused the bench instead ("panes should be enlargable and shrinkable",
297297 /// of panes that already resized). 12 px is the ±6 px of aim every editor's
298-/// dividers allow.
299-pub(crate) const GRAB_W: f32 = 12.;
298+/// dividers allow, and it is hung one row above the strip rather than centred
299+/// on it: what a hand aims at is the line it can see (the panel's own edge at
300+/// the strip's far side), not the six transparent pixels in front of it.
301+pub(crate) const GRAB_W: f32 = 14.;
300302
301303 /// The most of the window one side column may be dragged to. A third each, so
302304 /// the picture keeps the middle at every size -- the rule [`library_w`] and