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 {
248 /// first move -- so the lit line has to come from the model, not from `hover`.248 /// first move -- so the lit line has to come from the model, not from `hover`.
249 ///249 ///
250 /// What the *hand* aims at is wider than what the eye is given: the press and250 /// 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, mounted251+/// 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
252 /// absolutely so it overlays its neighbours instead of pushing them (the strip254 /// absolutely so it overlays its neighbours instead of pushing them (the strip
253 /// keeps its [`SPLIT_W`] of layout, and `layout::split_drag_size` keeps255 /// keeps its [`SPLIT_W`] of layout, and `layout::split_drag_size` keeps
254 /// answering in strip coordinates). A 6 px target missed by 5 px is a resize256 /// 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
285 .when(across, |d| {287 .when(across, |d| {
286 d.left_0()288 d.left_0()
287 .right_0()289 .right_0()
288- .top(px((SPLIT_W - GRAB_W) / 2.))290+ .top(px(-1.))
289 .h(px(GRAB_W))291 .h(px(GRAB_W))
290 .cursor_row_resize()292 .cursor_row_resize()
291 })293 })
292 .when(!across, |d| {294 .when(!across, |d| {
293 d.top_0()295 d.top_0()
294 .bottom_0()296 .bottom_0()
295- .left(px((SPLIT_W - GRAB_W) / 2.))297+ .left(px(-1.))
296 .w(px(GRAB_W))298 .w(px(GRAB_W))
297 .cursor_col_resize()299 .cursor_col_resize()
298 })300 })
crates/app/src/layout.rsmodified+4 -2
@@ -295,8 +295,10 @@ pub(crate) const SPLIT_W: f32 = 6.;
295 /// have -- the lead's own press one row into the bench missed the seam by 5 px295 /// have -- the lead's own press one row into the bench missed the seam by 5 px
296 /// and focused the bench instead ("panes should be enlargable and shrinkable",296 /// and focused the bench instead ("panes should be enlargable and shrinkable",
297 /// of panes that already resized). 12 px is the ±6 px of aim every editor's297 /// of panes that already resized). 12 px is the ±6 px of aim every editor's
298-/// dividers allow.298+/// dividers allow, and it is hung one row above the strip rather than centred
299-pub(crate) const GRAB_W: f32 = 12.;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.;
300 302
301 /// The most of the window one side column may be dragged to. A third each, so303 /// The most of the window one side column may be dragged to. A third each, so
302 /// the picture keeps the middle at every size -- the rule [`library_w`] and304 /// the picture keeps the middle at every size -- the rule [`library_w`] and