rnote icon indicating copy to clipboard operation
rnote copied to clipboard

Allow additional margin for one by one selection mode to allow near misses

Open Excigma opened this issue 6 months ago • 1 comments

Is your feature request related to a problem? Please describe.
Using select one by one on thin strokes is slightly difficult, as you have to tap incredibly near or on the stroke to select it (by design).

Describe the solution you'd like
Find the closest stroke (within some margin) to the tap instead of looking for intersections This is not the units you are looking for, but within something like ~1-2mm tolerance would be nice.

Describe alternatives you've considered
Just getting better at using the stylus, I suppose It might be possible to dialate the stroke - I don't know if this is placebo or if it actually works, but I've tried this: https://github.com/Excigma/dotfiles/blob/trunk/modules/overlays/patches/rnote-enlarge-selection-bounds.patch this might? make the eraser tool more sensitive too

Excigma avatar Jun 15 '25 00:06 Excigma

this might?

Yes this will work.

make the eraser tool more sensitive too

Probably yes. You'd have to do modify the signature of stroke_hitboxes_contain_coord to only change this for the selector here (and check the callers to see if the eraser calls this).

Now If I'm not mistaken the hitboxes are supposed to be a little larger than the strokes themselves for this https://github.com/flxzt/rnote/blob/b12eb2cdd1e144b1c1c2e64af7bf80269519f415/crates/rnote-engine/src/strokes/shapestroke.rs#L121

Though the precision/ease of use maybe isn't yet optimal for selection here. We may have issues if the margin gets too large (do we obscure smaller elements close to a larger one in some case? The filtering doesn't find the closest element here, it takes everything that fits. As the hitbox is supposed to be larger from the start, you can't do finer things: going from a large loosening of hitboxes to a smaller one on the first keys that passed)

As it stands, the one-by-one mode is easier to use by maintaining it pressed like so:

https://github.com/user-attachments/assets/bbbfba36-2fa9-49bf-ac4b-e56a2ca1f722

Doublonmousse avatar Jun 16 '25 06:06 Doublonmousse