Skip to content

Conversation

@n3oney
Copy link
Contributor

@n3oney n3oney commented Jan 17, 2026

changes line thickness to not be per entire line but per segment, so you can actually change the thickness back and forth, just like most programs let you, using a new shape FreehandPressure
image

and also adds support for eraser tool if the stylus supports it (see video, mine has it on the opposite side of the drawing tip), goes back to last-used tool when going back to drawing tip

video_2026-01-17_14-06-57.mp4

@devmobasa
Copy link
Owner

Thanks for the PR. This is a tricky one.

Some suggestions:

  • Color: FreehandPressure already has a single color (src/draw/shape/types.rs:54), but the selection logic ignores it. Color should behave like normal freehand strokes: include FreehandPressure in shape_color (src/input/state/core/properties/summary.rs:67), show it in the selection UI (src/input/state/core/properties/entries.rs:18), use it for the base color when cycling (src/input/state/core/properties/apply_selection/helpers.rs:13), and apply color changes (src/input/state/core/properties/apply_selection/actions/color.rs:18).

  • Thickness: pressure strokes do not have a single thickness value; they have per-point thickness. So instead of editing, show a disabled entry like "Thickness: varies (pressure)" in the selection UI. Today the thickness row disappears because shape_thickness only handles shapes with a single thick (src/input/state/core/properties/summary.rs:81) and the UI only shows it if that returns a value (src/input/state/core/properties/entries.rs:38).

@devmobasa devmobasa merged commit 37d3202 into devmobasa:main Jan 20, 2026
@devmobasa
Copy link
Owner

Thanks for the PR! I merged this in, and made a few things configurable related to the pressure behavior.
Let me know if something doesn't work, and I can get it fixed, or feel free to open a new PR.

@n3oney
Copy link
Contributor Author

n3oney commented Jan 20, 2026

Thanks a lot. So far it seems to work fine, I think there's a small bug with the eraser - it doesn't quite manage to switch to it fast enough if you bring it really quickly, starts to lag for a bit. Not sure if this was in my branch as well or if it's some kind of regression, I'll try to get some more info when I can.

@devmobasa
Copy link
Owner

That is good to hear. Thanks for letting me know. If you get some useful logs do let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants