Commit Graph
308 Commits
Author SHA1 Message Date
bflatastic 6de10ac297 canvas-w7: net change of 1 commits
- canvas-w7: written from its sheet
2026-11-21 21:26:26 +07:00
bflatastic 5e06e0cace Contract stubs: refresh (i18n, keymap, behavior, font-catalog, platform, window, appkit, wayland, automation, dialogs, ui-contract, ui-widgets, ui-panels, ui-canvas, ui-patterns, color-ui, draw, pages, print, font-manager, text, layers, craft) 2026-11-21 19:03:27 +07:00
bflatastic 1f60297144 Contract stubs: craft-color-ui, craft-dialogs, craft-draw, craft-imaging, craft-layers 2026-11-21 13:52:28 +07:00
David MannandClaude Opus 5.5 33c825ef13 Merge origin/next into anchor/12707-drag-handles
Keeps both sides of the BezierTool::AddAnchor doc: the 5-point segment
reach from next and the drag that pulls out the new anchor's handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 18:35:59 +01:00
David Mann cce3836b0e Merge pull request #2282 from davidmann4/anchor/12732-segment-reach
Add Anchor: reach a segment within 5 points (photocraft#12732)
2026-11-19 18:24:21 +01:00
David MannandClaude Opus 5.5 3754cb21e3 Merge origin/next into anchor/12707-drag-handles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:16:47 +01:00
David MannandClaude Opus 5.5 2c488615e1 Merge origin/next into anchor/12732-segment-reach
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:16:44 +01:00
aiongg fc8d1205ab Use const for immutable UI tables (#2336) 2026-11-19 06:40:20 +00:00
David Mann 88e2642794 Merge remote-tracking branch 'origin/next' into anchor/12707-drag-handles
# Conflicts:
#	crates/draw/src/ui/pen/bezier/mod.rs
2026-11-19 02:34:27 +01:00
David Mann 93e68f35a1 Merge remote-tracking branch 'origin/next' into anchor/12708-edit-existing
# Conflicts:
#	crates/draw/src/ui/pen/bezier/mod.rs
#	crates/draw/tests/it/bezier.rs
2026-11-19 02:31:29 +01:00
David Mann a2154f728f Merge remote-tracking branch 'origin/next' into anchor/12732-segment-reach
# Conflicts:
#	crates/draw/src/ui/pen/bezier/mod.rs
#	crates/draw/tests/it/bezier.rs
2026-11-19 02:25:36 +01:00
David MannandClaude Opus 5.5 3ab557ff7c Add Anchor: a drag from a segment pulls out the new anchor's handles
In the reference application a drag from a segment with Add Anchor
Point adds the anchor where the segment was pressed and pulls out its
handles as the Pen does: the out handle follows the pointer and the in
handle mirrors it, in one step. Shift turns the handle to the nearest
45 degrees (an axis keeps the drag's offset along it, a diagonal the
shorter offset), and Alt pressed during the drag breaks the pair so
only the out handle follows. The overlay moved the new anchor instead.

Add Anchor's drag now reports the new `PathEdit::PullAnchor` (insert at
`t`, out handle, in handle once Alt broke the pair), which `apply`
carries out. A click still reports `InsertAnchor`, and the Pen's Auto
Add/Delete keeps moving the anchor it adds. Space moving the anchor
mid-drag is not part of this change: the overlay cannot read Space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:11:53 +01:00
David MannandClaude Opus 5.5 4d78bb2de2 Add Anchor: Alt selects or copies the whole subpath
In the reference application Alt does not turn Add Anchor Point into
Delete Anchor Point: an Alt click on a segment selects every anchor of
its subpath and adds nothing, an Alt drag moves a copy of the subpath
(the copy ends up selected), an Alt click on an anchor deletes nothing,
and the cursor is the arrow with a plus.

The overlay now does the same under Add Anchor, reusing Direct
Selection's Alt segment press (`PathEdit::DuplicateSubpath`, or the
subpath itself on a path that takes no copies). Delete Anchor with Alt
still adds an anchor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:03:09 +01:00
David MannandClaude Opus 5.5 0274c3e5a0 Add Anchor: select and edit existing anchors and handles
In the reference application the Add Anchor Point tool edits the
anchors and handles a path already has as Direct Selection does; only
a press on a segment adds an anchor. The overlay took a press on an
anchor and did nothing with it, and never took a handle.

Under Add Anchor a press on an anchor now selects and drags it as
Direct does (Shift adds to the selection), a press on a shown handle
drags it (Alt moves it alone), and a click on empty canvas deselects
the anchors and keeps the path. Alt on an anchor is still Delete
Anchor's click, and a click on a segment still adds an anchor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:59:49 +01:00
David MannandClaude Opus 5.5 7f56589f5a Add Anchor: reach a segment within 5 points
The reference application adds an anchor when a click is up to 5 px
from a segment at 100 % and adds none at 6 px. The overlay's segments
hit within a line's 4 points, so a click 4.5 or 5 points away added
nothing under Add Anchor.

craft-behavior's polyline hit shape gets its own reach
(`HitShape::polyline_within`; `polyline` keeps `LINE_REACH`), and the
overlay gives Add Anchor's segments a 5-point reach. Delete Anchor,
Direct Selection and the other tools keep a line's reach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:55:39 +01:00
aiongg e79a3ed16e TransformBox: trial that a frame run twice reports each drag move once
A frame's second pass runs the box's update again with the press still
held at the same point. The proposal it makes equals the one the first
pass reported, and the gesture reports an equal proposal only once, so a
host that applies each Update applies it once per move. The trial runs
a drag with every frame run twice and counts the updates.
2026-11-18 20:59:41 +00:00
aiongg cd157c7e8c clippy: update's Linux cancel trials are a cfg(test) module; tail expressions in the corner and raster trials 2026-11-17 17:47:17 +00:00
aiongg 35b0b38909 Rename our craft-color to craft-color-ui; keep storytold main's craft-color (frame colour tags) at crates/color 2026-11-17 12:54:32 +00:00
aiongg 98226eb219 Merge branch 'look/align' into fw/mac1 2026-11-17 08:04:37 +00:00
aiongg 5ccb18f828 A transformed box's corner near the origin holds the precision of the box's largest coordinate: a host's f32 write-back of a rotated text box no longer reads as a document change that cancels the handle drag after its first step 2026-11-17 08:02:42 +00:00
aiongg db4365d954 TransformFields panel form: the angle's rotate glyph sits beside its field in the column's label column, as W, X and H do; the bar keeps it inside 2026-11-17 07:59:12 +00:00
aiongg fe8fdf6eea TransformBox corners take the first quarter of each side's band beside them, at most the band's width along it, as PhotoCraft's box does 2026-11-17 07:13:24 +00:00
aiongg 110f62f255 Merge branch 'fw/press-route' into fw/mac1
# Conflicts:
#	crates/ui-contract/src/primitives/sensing.rs
2026-11-17 06:31:19 +00:00
aiongg 053d567561 Press routing by kind: a press's click and its drag each go to the root whose shape is on top for that kind; under a drag-only grip a child keeps its click, a drag-only root below a button takes the drag; TransformBox parts take the click with the drag so a press on the box is the box's alone; DIAG covers the two trials (CRAFT_DIAG_TEST) 2026-11-17 06:20:27 +00:00
aiongg 951a1755fd TransformFields panel form: the number fields fill their grid cells 2026-11-17 06:16:55 +00:00
aiongg c410d7ddbf TransformBox takes PhotoCraft's zones: a corner or side handle reaches handle.md from its point, and each side's band reaches outside the box only, so inside the box off the handles a press reaches what lies under it 2026-11-17 06:16:10 +00:00
aiongg 4a3c72f2db Look align: text parts ignore the host's egui size floor; options bars at the standard control size; selects in a bar fit their widest entry; check box labels in body type; title band glyphs at size.icon.sm with a faint kind caption; Inspector names its target at section weight; Transform fields fill two columns, W and H first 2026-11-17 06:13:31 +00:00
aiongg ab8612ef7c Gradient palette shows its presets as small chips: PresetBrowser's PresetTiles::Chips variant, grid headers and tail rows a collection row high 2026-11-17 05:11:53 +00:00
aiongg 5c50580db9 Sensing: a press past the root's clip (automation's) is taken by a part that shows inside the clip, never by one the clip hides wholly; suite drives skip wholly hidden parts of a canvas control (the clip of its arena), and the corner widgets' drive grips a widget the fixture shows 2026-11-17 04:15:51 +00:00
aiongg 9db1bef17f Value gestures: a host that keeps a number in f32 echoes the proposal rounded to it; Slider, SliderField, AngleDial and TransformBox read that echo as their own value (craft_behavior::same_in_f32), so a live drag runs on as one gesture 2026-11-17 02:39:48 +00:00
aiongg 86ff913c14 cargo fmt 2026-11-17 01:37:58 +00:00
aiongg 0ea70922fb Merge branch 'red/t6e' into fw/mac1 2026-11-17 01:05:29 +00:00
aiongg 8f46d3c69a Merge branch 'red/t45e' into fw/mac1
# Conflicts:
#	crates/ui-contract/src/runtime/focus/nav.rs
#	crates/ui-widgets/tests/it/body/scroll.rs
2026-11-17 01:05:29 +00:00
aiongg 98477eec5c Gradient palette: the presets take their content height up to five small control heights, then scroll
In a content-sized popover (the paint chip's Gradient tab) the palette's preset browser filled the
popover's whole room, so the gradient options under it (Reverse, Dither, Align) fell below the
window. The old palette scrolled past five small control heights, as PhotoCraft's 120 px preset
list does; the browser's room_height gives that bound.
2026-11-17 00:34:27 +00:00
aiongg 2c7ce20114 Empty-part cursor: copy the part result before the cursor call 2026-11-17 00:29:18 +00:00
aiongg 4d600ed6da Transform box: arrows move the whole box unless the keyboard picked a part 2026-11-17 00:22:35 +00:00
aiongg 8a30a026fe The anchor tools' empty-canvas part shows the tool's off-path cursor 2026-11-17 00:21:36 +00:00
aiongg 959927e686 rustfmt the crates round C changed 2026-11-17 00:18:07 +00:00
aiongg a4570cb03c Merge branch 'red/t2c' into fw/mac1
# Conflicts:
#	crates/draw/src/ui/pen/curvature_mode.rs
2026-11-16 23:37:48 +00:00
aiongg 4b28aad62f Merge branch 'red/t3c' into fw/mac1 2026-11-16 23:37:38 +00:00
aiongg 79a5564061 rustfmt the crates round B changed 2026-11-16 23:32:27 +00:00
aiongg 93bfcb46fe Pen: the knot a press acts on is named knot, so the snapped point at stays the new anchor's place 2026-11-16 23:32:16 +00:00
aiongg dd0c65a680 BezierOverlay: an open press declares and handles its parts from the paths it began on; Add and Delete Anchor report a press on empty canvas (pressed_empty), whose doc says which tools report it 2026-11-16 23:01:15 +00:00
aiongg d824fa99d7 Curvature Pen: a press away from every end point carries on the subpath the host names (PenTool::carry_on), adding its anchor to it 2026-11-16 22:50:40 +00:00
aiongg fcde55c303 bezier trials: a host-cancelled press restores nothing; arrow trial empties the Tab-arrival selection 2026-11-16 22:48:42 +00:00
aiongg cb14f32232 Merge branch 'red/t4d' into fw/mac1 2026-11-16 22:47:46 +00:00
aiongg d69d80d2cd Merge branch 'red/t10' into fw/mac1 2026-11-16 22:47:46 +00:00
aiongg b865bd53ad Merge branch 'red/t9' into fw/mac1 2026-11-16 22:47:46 +00:00
aiongg 5d9a02e86b Merge branch 'red/t7' into fw/mac1
# Conflicts:
#	crates/behavior/src/geometry/draft.rs
#	crates/behavior/tests/geometry/draft.rs
2026-11-16 22:47:46 +00:00
aiongg a8d15655ac Pen trial: the carried-anchor press lands on a middle anchor, since a press on the first anchor of a draft of three closes it 2026-11-16 22:47:33 +00:00