Commit Graph
12359 Commits
Author SHA1 Message Date
David MannandClaude Opus 5.5 6ae6d03cf0 ui-contract: a cover from another component's parts spans each part's grown hit area
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:55:45 +01:00
David MannandClaude Opus 5.5 cd1ab777be ui-contract: a cover from another component's parts is clipped to where each part shows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:48:17 +01:00
David MannandClaude Opus 5.5 5338833d1e ui-shell: format the dialog window move test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:33:35 +01:00
David MannandClaude Opus 5.5 c13f5fcdc6 ui-panels: alerts and prompts move by their title row (photocraft#17952)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:26:30 +01:00
David MannandClaude Opus 5.5 62cb3207e8 ui-contract: a dialog in its own window moves by its title row where the platform answers the hit test (photocraft#17952)
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>
2026-11-29 17:26:29 +01:00
aiongg 9949e08d6f Merge pull request #3438 from storytold/design-port/pr-input-focus
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
2026-11-29 10:52:12 -05:00
Dylan M. Taylor 1f6c3a21f8 feat(nightly): add shared craft-nightly profile isolation crate (#4270)
* feat(nightly): add shared craft-nightly profile isolation crate

* fix(nightly): preserve startup isolation and document profile migration

* feat(craft): expose craft-nightly through facade crate

* fix(nightly): reject misplaced protocol flags and use zero-access Windows metadata query
2026-11-29 10:31:11 -05:00
David Mann bfd8fec34b Merge pull request #4276 from davidmann4/fix/eyedropper-ring-persist
color-ui: an Eyedropper built anew each pass keeps the held sampling ring (photocraft#17931)
2026-11-29 16:26:55 +01:00
aiongg 94bf0e02fc Merge pull request #3452 from storytold/lightcraft-pr/fw-runtime-fork
Runtime: fork a window's UI state into another context for headless capture
2026-11-29 10:14:34 -05:00
skylar taylor-barrickandFredApps 76416ccd31 Dock dividers move with the move that starts their drag (#3461)
* 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>
2026-11-29 10:07:14 -05:00
Dylan M. Taylor d49ee8d237 Merge main and regenerate contract API after inspector changes 2026-11-29 10:07:01 -05:00
skylar taylor-barrick 8b78923296 Inspector and accessibility names (#3215)
* 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
2026-11-29 10:04:40 -05:00
David Mann 3fb7f93211 Merge pull request #4274 from davidmann4/perspective-crop-start-snap
Perspective Crop: a box drag starts on the document bounds the canvas snaps to (photocraft#11803)
2026-11-29 15:48:51 +01:00
David Mann 347f772c2e Merge pull request #4273 from davidmann4/fix/brush-picker-range-alert
Brush Preset picker: a Size or Hardness typed out of range reports the range alert
2026-11-29 15:48:40 +01:00
David MannandClaude Opus 5.5 779b536f71 Perspective Crop: a document of broken size snaps the drag start neither to a corner nor to an edge
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:23:46 +01:00
David MannandClaude Opus 5.5 bf378c95ee Brush Preset picker: take the Size alert before Hardness's, out of the head's closure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:20:48 +01:00
David MannandClaude Opus 5.5 42a7f08637 color-ui: an Eyedropper built anew each pass keeps the held sampling ring (photocraft#17931)
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>
2026-11-29 15:18:17 +01:00
David MannandClaude Opus 5.5 9a0766e3d9 Perspective Crop: snap the drag start through the canvas's Snap, not a field of its own
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>
2026-11-29 15:14:54 +01:00
David MannandClaude Opus 5.5 8a6336c117 Perspective Crop: a box drag's start can snap to the document bounds (photocraft#11803)
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>
2026-11-29 15:10:05 +01:00
David MannandClaude Opus 5.5 5aa7919fe7 Brush Preset picker: a Size or Hardness typed out of range reports the range alert
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>
2026-11-29 15:09:40 +01:00
BFlat 186a229c8d Merge pull request #4259 from dotCooCoo/fix/color-panel-cancel-restore
color-ui: ramp, hex, readout, gamut chip and well edits start from the host's complete color
2026-11-29 20:25:11 +07:00
BFlat abb4ad8cc9 Merge pull request #4251 from dotCooCoo/fix/automation-readonly-field-edits
shortcuts: automation cannot press, assign or remove a shortcut where the user cannot edit one
2026-11-29 20:25:06 +07:00
BFlat bec8baa0d3 Merge pull request #4239 from dotCooCoo/fix/paragraph-controls-measure-host-rows
text: the Paragraph controls' host rows count in their measured height
2026-11-29 20:25:00 +07:00
BFlat fa4d56bb89 Merge pull request #4240 from dotCooCoo/fix/line-label-centers-on-control
ui-contract: a Line field's label sits on its control's line inside a row
2026-11-29 20:24:54 +07:00
BFlat e18f4d8819 Merge pull request #4242 from dotCooCoo/fix/palette-pinned-top
ui-patterns: the command palette keeps its top and field in place as the query changes its rows
2026-11-29 20:24:48 +07:00
BFlat 8e6ba308e7 Merge pull request #4247 from dotCooCoo/fix/combo-box-least-width
ui: a combo box narrows below its widest option, as a text field does
2026-11-29 20:24:43 +07:00
BFlat b48026cb3e Merge pull request #4261 from dotCooCoo/fix/properties-dialog-measuring-tab
form_dialogs: a properties dialog keeps its bound tab when the body does not run
2026-11-29 20:24:37 +07:00
David Mann 955c64f119 Merge pull request #4263 from davidmann4/shortcuts-undo-toggle
menu: Keyboard Shortcuts dialog can offer one Undo button that steps the last change
2026-11-29 14:12:12 +01:00
David Mann f4ebe19d64 Merge pull request #4264 from davidmann4/fix/new-doc-advanced-options-14035
New Document: Advanced Options holds Color Profile and Pixel Aspect Ratio; the depth reads 32 bit (photocraft#14035)
2026-11-29 14:10:52 +01:00
David MannandClaude Opus 5.5 cb477ef88e New Document test: unfold Advanced Options past the double-click time, with the header found again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:25:50 +01:00
David Mann 0526210afd menu: the undo toggle tests compare with the keys as stored, not as Windows shows them 2026-11-29 13:14:24 +01:00
David MannandClaude Opus 5.5 8d09ceca38 New Document test: fold Advanced Options without motion, so the check runs after the fold ends
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:00:39 +01:00
David Mann 5dab5d4317 menu: a queued undo key no longer allowed is dropped, and the toggling button acts only as it reads 2026-11-29 12:51:26 +01:00
David Mann 0990990739 menu: the undo keys re-check after each step, so a second step in a frame cannot reach past the last change 2026-11-29 12:43:53 +01:00
David MannandClaude Opus 5.5 a959117beb New Document: Advanced Options holds Color Profile and Pixel Aspect Ratio; the depth reads 32 bit
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>
2026-11-29 12:36:19 +01:00
David Mann ff93186c9f menu: Keyboard Shortcuts dialog can offer one Undo button that steps the last change
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.
2026-11-29 12:36:15 +01:00
dotCooCoo 3709b7690b form_dialogs: a properties dialog keeps its bound tab when the body does not run
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.
2026-11-29 02:57:22 -08:00
Martin BallandClaude Opus 5.5 27c2cbf821 tests: pin the OS in two layout tests that fail on macOS (#4257)
Fixes #4256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 10:32:25 +00:00
FredApps 9ad1dbf1b4 Retain unchanged UI registrations and keep worker repaints thread-safe (#4246)
* Retain unchanged UI registrations and keep worker repaints thread-safe

* Pin merged retained-paint egui with compatible paint visitors

* Verify edited owner state survives retained region transfers

* Seed retained-state regression through a writable stage

* Synchronize egui revision metadata and isolate the retained-state edit frame
2026-11-29 11:14:05 +01:00
dotCooCoo 1d935b0d93 color-ui: ramp, hex, readout, gamut chip and well edits start from the host's complete color
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.
2026-11-29 01:59:06 -08:00
dotCooCoo 0029c5e434 shortcuts: automation cannot press, assign or remove a shortcut where the user cannot edit one
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.
2026-11-29 00:49:24 -08:00
dotCooCoo 0947328096 ui-contract: a resizable top-share float holds its default size to the room below its top
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.
2026-11-28 23:44:18 -08:00
dotCooCoo d0d96eb81b ui: a combo box narrows below its widest option, as a text field 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.
2026-11-28 23:40:55 -08:00
Harsh Verma 57c8c8d488 hayro: average minified 1-bit masks and Type 3 bitmap glyphs (storytold/pdfcraft#7936) (#2526)
* 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)
2026-11-29 08:36:47 +01:00
dotCooCoo 9397987668 ui-patterns: the command palette keeps its top and field in place as the query changes its rows
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.
2026-11-28 23:01:52 -08:00
dotCooCoo 8c12c57731 ui-contract: a Line field's label sits on its control's line inside a row
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.
2026-11-28 22:46:59 -08:00
Dylan M. Taylor db0b5931e2 Merge pull request #4232 from storytold/deps/egui-numpad-physical
Pin egui at 5dded175 (numpad keys' physical identity, storytold/egui#48)
2026-11-29 01:46:47 -05:00
dotCooCoo 4576af1b6b text: the Paragraph controls' host rows count in their measured height
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).
2026-11-28 22:45:18 -08:00
BFlat 869c9704d9 Merge pull request #4233 from dotCooCoo/fix/length-slider-access-step-main
slider_field: a length field declares the key policy's accessibility step
2026-11-29 13:23:10 +07:00
David Mann f1b53230ac Merge pull request #4160 from davidmann4/fix/layer-style-stroke-emboss
Layer Style: offer Stroke Emboss in the Bevel & Emboss Style menu
2026-11-29 07:22:01 +01:00