Another component's widget over a drag band covers it only where that
component's parts take a press: a dialog's title row covers its band
with its close button, not with its whole row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Input and focus fixes: wheel over text fields, Scroll Into View on list rows, click modifiers, shown-only chords, face names, right-click outside menus, mixed sliders
* docking divider: a drag moves the divider with the move that starts it
The move that carries a press past slop arrives as PressPhase::DragStart with the pointer position, but divider::drag dropped it, so every container moved its divider a pass later. Drag::Start now carries its coordinate (Start(f32), mirrored for right-to-left like To) and Drag::coord gives the coordinate of either. SplitArea, DockColumn, StackSections, the iconic column's edge, SplitViews, the column bar and the margin handles begin their gesture as before and then apply the start's coordinate in the same pass.
Drag is public, so Start(f32) is an API change for code that matches Drag::Start.
Trial a_column_divider_follows_the_move_that_starts_its_drag_in_the_same_pass
* docs: regenerate contract-api.md
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* Inspector: name generic components by their type and list a text field's value
The component name dropped the path before the generic arguments, so Select<'_, String> was
recorded as `String>`. A text node's value, which AccessKit reads, now also shows in the
inspector's facts.
* Inspector: test generic component names and text field values
* Keep the components of a replayed memoized view in the enclosing inspected region
* SwatchPair: each well's access node is named by its own label, not the pair's
* rustfmt
* Inspector: clippy tidy-ups in the replay step and its trial
* Inspector: a text field's value is journaled like the other steps, so a replayed view keeps it; the pair trial checks each name is its well's radio button
* inspect: list a text value whichever order the node's facts arrive in
A text value noted before its node's facts in the same pass was dropped, as it
was only written on facts that already existed. The open region now keeps the
noted value per component and writes it on the facts when they arrive, so the
order no longer matters; a value the node states itself still wins. The steps
journal and replay as before.
The trial drives the record's calls in each order: text value before facts,
facts before text value, facts reported again, and a node's own value.
* Inspector trial: a null-rooted id and a let-else in place of expect, for next's lints
* Inspector trial: assert the region ran instead of panicking, for next's lints
* docs: regenerate contract-api.md
* contract-api: an entry's summary is its first sentence, not its first line
The generator showed the first line of each item's doc comment, so an entry whose doc comment wrapped
mid-sentence ended on a dangling word: the press latch's `release` stopped at "an earlier", `swallows` at
"true for the", and about a quarter of the file's entries were cut off the same way.
The summary now carries the wrapped lines to the end of the first sentence, stopping at a colon that
introduces a list, so every entry reads whole. Only the clipped tails change: each completed entry keeps
its text and gains the rest of the sentence from the item's own doc comment. docs/contract-api.md is
regenerated with it.
* contract-api.md: regenerated after the merge of main (the generator's own output, not a hand merge)
* contract-api: a summary stops at its first sentence's end inside a line
`doc_summary` only stopped at the end of a line, so a doc line that held two sentences (`... release or
cancel. A press that begins while nothing is latched is not swallowed.`) carried both, and the entry was
two sentences long.
`sentence_end` now finds the boundary inside the line: a full stop, question or exclamation mark that ends
the line, or that a space and a capital letter follow, and never a run of dots (`(LRI ... PDI)`) or one of
the short forms e.g., i.e., cf., vs., etc., approx. The summary stops there; a colon that introduces a list
below still ends it too.
docs/contract-api.md is regenerated with the rebuilt binary.
* memo keys: whether a region is open; contract-api: no Self:: link targets
A memoized view's key held the props, the `fn` and what the scope around it hands down, but not whether an
inspected region was open. A view that settled outside a region kept a run that recorded no inspection steps
(`runtime::inspect::run` notes one only while a region is open), so when a region later wrapped the unchanged
view it replayed that run and the region's record showed none of its components: the inspector listed nothing
for what the region showed.
Whether a region is open now feeds the key, one byte after the show address, so a view settled outside a
region runs in the pass that shows it inside one and records the region's steps; a run made inside a region is
not replayed outside one either. `contract::inspect_region` trials both directions and the region's recorded
components, and `record`'s doc says why. Without the key byte that trial fails.
`doc_summary` also drops the target of a link that names the item's own type (`Self::zoom_x`), which rustdoc
resolves in the source and this file has no page for: the entry keeps its reference text, as the file writes
every name it cannot link. docs/contract-api.md is regenerated with the rebuilt binary: 77 lines, the 82 link
targets and nothing else, and a second run leaves it byte-identical.
Focused trials pass: ui-contract's `contract::inspect_region` (new), `memo`, `derived` and `contract::fixes`,
ui-widgets' `memo` and `runtime::inspect` (the region's components through a replay included), and
craft-menu's `keytips`.
* docs: regenerate the contract catalog on current main
EyedropperTool::ring reads the ring the button holds and EyedropperTool::held hands it to the next pass's
tool, so an app whose sample closure borrows its state, and so rebuilds the tool every pass, paints the
ring in a pass with no pointer input too instead of flickering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tool builds no snapping of its own: the edge snap now goes through
ToolContext::snap_of (the canvas's tolerance, View > Snap To, the
suspend key, the nearer target when both edges are in reach), and the
corner rule asks the new ToolContext::snaps_to_document_bounds. So
PerspectiveInput stays as it was and apps need no change beyond the
canvas Snap they already give.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerspectiveInput gains `snap: Option<StartSnap>`. With it, a box drag
pressed beyond a document corner starts at that corner, and one within
the snap distance of an edge starts on the nearer edge, from the drag's
first move. Clicked corners keep their place. A size that is negative or
not finite snaps nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BrushSizeField passes on its slider field's range alert, and the picker's
output carries the head's alert as out_of_range, so the host can show it
while the picker stays open (storytold/photocraft#11817).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The details pane puts Color Profile and Pixel Aspect Ratio in an Advanced Options disclosure under
Background Contents, open by default; folding it keeps their values. The float depth entry reads
"32 bit" (storytold/photocraft#14035).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Options::undo = UndoButtons::Toggle puts one button in the footer in place of
Undo and Redo: it undoes the last change and turns into Redo, which applies it
again and turns back into Undo. Starting to record a shortcut disables it until
the next change, so it never reaches past the change before. The undo and redo
keys follow the button. The default (History) is unchanged.
PropertiesDialog wrote the shown tab back to its `tab` binding after
every pass, starting from tab 0. A pass in which the body did not run
(a measuring run that ends before the body, or a closed dialog) wrote
0 back, so a dialog bound to its second tab showed the first one after
its first frame. The tab is now written back, and Reset Panel applied,
only when the body ran.
The Color panel gave the host's complete color (with its native components)
as the `before` of channel, cube and wheel edits only. The ramp, the cubes'
readout, the FillStroke hex field, the out-of-gamut chip and the Black and
White wells sent a `before` without the host's model values, so Undo of
those edits lost a host's typed CMYK. A ramp drag's Begin and Cancel
carried `Mixed`, so Cancel of a ramp drag left the live preview in place.
These edits now take the color the gesture began from, kept through the
host's live updates, or the current color for a one-step edit: the host's
`edited` color for the edited well, otherwise the well's color.
ShortcutsDialog::set_json_field refused `replace` in a read-only dialog,
while a prompt, review or recording was open, and on an app tab, but it
accepted `pressed`, `assign` and `remove` in those states.
DialogState::can_edit holds the condition `replace` already used, and
all four editing fields now return the inactive refusal when it is
false.
The default size of a resizable float was held only to the screen, so a float placed by its top share with a tall default size outgrew the room below its top, and the keep rule moved its top up past the share. The default size now goes through FloatPlace::room_in, as the content-sized path does.
A combo box measured its least width as its widest option, its current
text and its placeholder plus the chevron, at every proposal. A text field
at its least shows a short part of its text and scrolls the rest. In a grid
whose fill columns did not fit beside each other at their leasts, a combo
box of long options made the grid stack its cells one under another while a
text field in the same place would have narrowed. At its least the combo box
now counts only the chevron's room; its natural width is unchanged.
* hayro: average minified 1-bit masks and Type 3 bitmap glyphs (storytold/pdfcraft#7936)
* hayro-interpret: pass one_bit to eight-bit RGB branches
* hayro: use bilinear sampling for minified 1-bit Type 3 glyphs (storytold/pdfcraft#7936)
The dialog face of CommandPalette was a modal centered on both axes and
sized to its rows, so its search field moved up and down with each query.
The box is now centered across the window with its top 15% of the window's
height down, and only its bottom edge moves as the rows come and go.
- ui-contract: FloatPlace::top_centered(share) places a float centered
across its bounds with its top at that share of their height. Its room is
held to the height that leaves the same share below it, measured in the
overlay's own bounds, so a body as tall as it may grow (in an embedded
shell, whose region lifts the modal's cap) does not push the top up.
- ui-patterns: the palette's dialog face uses it, at the share that matches
its 70% height cap.
- Tests: the palette's top and field stay put between a 12-row and a 1-row
query; in an embedded shell a 50-row list leaves the top in place; a
bounded float keeps its top for a short and a tall scrolling body.
A field laid out FieldLayout::Line centered its label on the height of the control's cell. Inside a Row the cell is as tall as the room the row has, so the label was drawn far below the number field, out of sight in a panel. The label is now centered on the control's height at the top of the cell.
The new test label::line::a_line_label_in_a_row_sits_on_its_fields_line puts a Line field in a Row in a 300 by 600 room and checks that the label and the value share a baseline. Without the fix the label's baseline is at 304 and the value's at 16.5.
ParagraphControls::show_with took `between` as FnOnce and ran it in the
first run of the controls' Stack body only. The Stack runs its body more
than once in a pass (measure, then real), so the host's rows were missing
from one of those runs. A container measured around the controls came out
one row short, and a flyout sized by that measure cut off Hyphenate below
its bottom edge.
`between` is now FnMut and runs in every run of the body. A caller that
passes a closure which only mutates its captures keeps compiling; one
that moves a captured value out needs to clone it.
The new test measures a Stack around the controls with a host row and
checks that the measure reaches the foot of Hyphenate. It fails without
the change (the host row does not show at all in that layout).