Commit Graph
7127 Commits
Author SHA1 Message Date
aiongg c10002e09f Frame cost: one Access rule for components, members and faces
Collection members build their Access and sub-node only when the
collection has a node, and faces build their record's facts only for a
reported face of a host with a node: the component's node flag (step 8)
is one signal on its core that the report, members and faces read.
Without a node, a component builds Access only when its roles include a
merged one or both a role with a node and none.

Tooltip texts are counted where text_of and spec_text build them; part,
member and pointer tooltips borrow their spec. The tooltip trial checks
that the tip shows its text and builds it once a pass while it fades,
and none after; the Access trial adds an open menu and a tab strip's
members.
2026-11-21 13:43:10 +00:00
aiongg 4c9df420e5 Regenerate docs/contract-api.md 2026-11-21 13:26:52 +00:00
aiongg bc73cf5d1d Frame cost: tooltip text and AccessKit data only when needed
The report step builds a component's Access only for a reader: its node,
a merged role's facts, or a type whose role Access picks from
alternatives. With AccessKit off, a run takes only the value text. The
carried-name lookup moves below the node check.

A tooltip's text is built only when the pointer or keyboard wants the
tooltip or its layer still shows, at most once per call, and the tooltip
spec is borrowed instead of cloned on every run.

Count trials: 40 Field rows build no Access with AccessKit off; 40
unhovered icon buttons build no tooltip text, the hovered one builds its
own once a pass.
2026-11-21 13:26:52 +00:00
David Mann 687aad26e9 Merge pull request #2810 from davidmann4/fix/photocraft-16113-memo-row-line
A memoized view in a row sits on the row's line (photocraft#16113)
2026-11-21 13:55:54 +01:00
David Mann 02be56cfbb A memoized view in a row sits on the row's line
A memoized view's content starts a layout room of its own (Env::start_room), so the view sat at the top of the
unwrapped Row around it while every other one-line child sits with its centre on the row's line. Since craft-menu's
bar became a memoized view, PhotoCraft's menu titles sat about 4 pt above the icon beside them (photocraft#16113).

The view's room now moves down by the whole pixels that put the centre of its extent (this pass's measuring run, else
its last run) on the row's line. The room keeps its size, so a kept run replays moved with it; a view taller than the
line reaches stays at the row's top, as place_in_cell keeps a child of more than one line.
2026-11-21 12:04:22 +01:00
David Mann fb8aae1df6 WIP: memoized view in a row sits on the row's line (photocraft#16113) 2026-11-21 11:43:38 +01:00
2946b2041a Icons on a Brand or Scrim surface paint their accent parts in their own ink; containers pass that ink down (#2569)
* #7149 item 4: an icon on a strong fill paints its accent parts in its own ink

A container that paints a Brand or Scrim surface now passes the strong-fill ink to what it holds, and Draw::icon paints an app icon accent layer in the icon colour when the ink is OnDark.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* design exceptions: the icon trial has a third fixed-tint site

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ui-contract: every filled surface sets its own container ink

A panel nested in a brand or scrim container no longer inherits the strong-fill ink. A frame or a surfaceless container keeps the ink it sits in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* buttons trials: import ShowContainer for the nested Stack trials

next dropped ShowContainer from the shared import line, so the merged
tree failed to compile (E0599 on Stack::show in accent_icon_tints_in).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-21 10:08:46 +00:00
David Mann fc1628e201 Merge pull request #2729 from davidmann4/fix/crop-resize-past-canvas
Crop: an edge or corner drag may take a document crop past the canvas
2026-11-21 10:43:15 +01:00
aiongg 4052526240 Merge pull request #2785 from aiongg/layers-id-hash-doc
craft-layers: LayerTree::Id's Hash tells distinct ids apart
2026-11-21 02:05:36 -05:00
aiongg 1443ed8dd8 Merge pull request #2767 from aiongg/memo-lint-state
No hidden state in UI crates: the lint's last entries (#2336)
2026-11-21 02:05:12 -05:00
aiongg 5f11477f6d craft-layers: LayerTree::Id's Hash tells distinct ids apart 2026-11-21 06:24:14 +00:00
aiongg 643bac8228 Merge pull request #2770 from aiongg/rework-windows
Windows and dock: palette state, minimized windows, drag at the pointer, palette popups
2026-11-21 00:52:33 -05:00
aiongg 76580a0f6c Merge pull request #2758 from aiongg/rework-dialogs
Dialogs and fields: Image Size, Canvas Size, New Document, resample order
2026-11-21 00:52:20 -05:00
aiongg cf1f0c41f6 Merge pull request #2774 from aiongg/layers-id-plain
craft-layers: tree ids are plain data, keyed by their Hash
2026-11-21 00:51:53 -05:00
aiongg 71b91c7d66 Merge pull request #2762 from aiongg/panel-states-memo
Panel states as memo props: Color, Actions and scope panels (#2336)
2026-11-21 00:39:04 -05:00
aiongg 683fe06031 craft-layers: tree ids are plain data, keyed by their Hash 2026-11-21 04:33:02 +00:00
aiongg cdab24a5fc Brush stories: the footprint note holds its serials and mask together 2026-11-21 04:31:24 +00:00
aiongg 4a063b6083 Serials::mint: the method is not an iterator's next 2026-11-21 04:26:33 +00:00
aiongg c29f9208b4 Minimized column height: then_some (clippy unnecessary_lazy_evaluations) 2026-11-21 04:19:11 +00:00
aiongg 1f07fbe259 No hidden state in UI crates: the lint's last entries (#2336)
Texture identities come from an owner-held Serials; the font picker's family data is a derived value keyed by the catalog generation; face file sizes are read at scan; the LUT scan lives in craft-cms and its rescan reads the stepped clock.
2026-11-21 04:02:10 +00:00
aiongg 161d2c0a42 Merge storytold next into rework-windows 2026-11-21 03:59:28 +00:00
aiongg 8d7b066488 Sizing trial: name the dialog opener type (clippy type_complexity) 2026-11-21 03:49:31 +00:00
aiongg c10470b3f0 An OS dock window's chrome is sized at its own display's scale
The rule under a floating window's title row takes the divider's width
in whole physical pixels on the display the window lays out on. An OS
window on another monitor (a laptop at 2x with an external display at
1x) laid its rule out at its own scale while the dock sized it at the
main window's, so the window was half a point short and cut its last
row.

DockSizes keeps the rule's width and the display scale it is for, and
at_scale gives the sizes at an OS window's own scale
(native::pixels_per_point: its monitor's scale from the window facts
with the app's zoom). DockArea::windows sizes each OS window's chrome
at that scale and hands it to FloatingGroup; in-app windows keep the
main window's.

A window's caller place now counts as a change when it moves the window
by more than half a physical pixel on its display, not half a point, so
a window that changes displays takes a one-pixel correction at 2x.
2026-11-21 03:43:11 +00:00
aiongg 7b104b7d6b Color, Actions and scope panel states derive MemoProps and PlainData, so an app can pass them as memo view props 2026-11-21 03:31:50 +00:00
aiongg 5c6747b5d9 A floating window's chrome counts the rule under its title row
A floating group draws a divider rule under its title row
(HeaderRegion::rule), and the container lays the rule out in a band of
its own: the divider's width in whole physical pixels (0.8 pt at
125 %). DockSizes::window_chrome left that band out, so a window sized
from its content (a collapsed palette, a minimized window, a stepped
window) was one pixel short and cut the bottom of its last row.

DockSizes::title_rule is the divider rule's band from the same token
and display scale the container uses, window_chrome adds it, and
FloatingGroup takes its chrome from DockSizes, so the dock and the
group size the window with one value. The collapsed and minimized
native palette trials check that the window fits its content exactly.
2026-11-21 03:31:24 +00:00
aiongg ce33666294 Layers opened from a palette window open in popup OS windows
A collapsed floating window is 40 pt wide, so its flyouts, the double
arrow's tooltip and the panel menu could not show inside it: the tooltip
wrapped one letter per line ("E x") and the flyouts opened outside the
window (#15861).

Every layer the overlay host shows from a palette window (a dock window
or a popup window, at WindowLevel::Palette) now shows in a popup window
of its own (WindowSpec::popup), placed in desktop points within the work
area around the palette (windows::popup_room, overlay::layer_room).
Layers from the main window stay in it; full-window layers cover their
own window.

- The popup's pass shows the layer and records it in the popup's stack,
  with its focus scope and Escape/Enter/activation dismissal. The
  opener's pass records an entry standing for the window
  (OpenEntry::popup), so family closes, the anchor and outside presses
  in the opener work as before; family closes also reach the layers in
  popup windows.
- A press in another app window closes an outside-closing popup, and a
  popup closes when the app loses focus.
- Popups that take keys take the OS focus and hand it back to their
  opener on close; tooltips take no focus and let the pointer through.
- A layer without a measured size (a tooltip) is laid out in the popup's
  pass, in the work-area room, and placed by the size it took there.
- A palette column passes no main-window bounds to its flyouts.
- The test kit keeps facts per popup window.
2026-11-21 03:23:23 +00:00
aiongg c9172b9ee9 Never two rules in a row: a rule above is dropped only right after a rule
No rule above a container that follows a rule

A container's rule above separates it from what precedes it in flow. A body's
flow starts after a rule when its container draws one under its header, or
when it draws nothing of its own (no header, surface or mount) and itself
started after a rule. A container right after a rule draws no rule above:
Canvas Size's Current Size section under the title's own rule. Any other
header or surface keeps the next container's rule above.
2026-11-21 03:12:57 +00:00
aiongg 614f4d5f16 Merge pull request #2747 from aiongg/rework-lists
Lists and the pen tools: hover moves only the lead in option lists; Escape keeps the anchor selection
2026-11-20 22:02:52 -05:00
aiongg b160ac3f87 Image Size: chain bracket and Resample row as 0.23.1; New Document: save icon on the Name row
A Row can bracket the labelled rows of its first child to the child after
them (`Row::bracket(Bracket::Linked | Unlinked)`): the rows report their
controls to the row, the child after them sits halfway between the first
and the last control, and a linked bracket runs from each control to it.
Image Size brackets Width and Height to their chain.

Each body's flow records whether it has placed a child yet in the sweep or
run under way. The first child of an unwrapped row that is itself a row of
a vertical flow counts as a row of that flow, so a check box that starts a
row of a form starts in the form's control column. Image Size shows
Resample with its method on one row there.

New Document's save action is the icon-only square-plus button at the end
of the Name row (tooltip "Save Document Preset"), as before the port.

Trials: the bracket's ticks and the chain's centre at 1x and 1.25x, the
check box that starts a row, Image Size on a host, and the save control
painting no text.
2026-11-21 02:58:47 +00:00
aiongg 68b0529bbf Merge pull request #2744 from aiongg/document-window-room
DocumentWindow: the body takes the window's room and never scrolls
2026-11-20 21:40:36 -05:00
aiongg 658bbcb6bd A dragged layer stands under the pointer in the frame of each step
The layer host shows a layer whose move band is being dragged at the drag's
rect for this pass: the rect the layer had when the band was pressed, moved
by the pointer's travel, within its bounds. window_drag runs the drag from
the same rect. A caller that places the layer (placed, placed_at, or an
anchored layer it places once moved) writes its place once, on the Commit.

- The task bar writes its place on the drop only: one edit, no lag.
- A floating dock window in the app window reaches the workspace on the
  drop only; resizes and keyboard moves keep their gesture edits.
- A layer root inside an opener's arena steps its press machine early, as
  its steps 6 to 16 sense in its own arena: the host reads this pass's band
  press before it places the layer.

Trials: a dragged task bar and a dragged floating window stand under the
pointer in each frame, in one pass, and are placed once, on the drop.
2026-11-21 02:37:40 +00:00
aiongg eb28db6ba9 Merge pull request #2589 from aiongg/memo-stack
Memoized views: derived values; dock, Layers, menu and tool rail keys without model walks
2026-11-20 21:37:21 -05:00
aiongg 4201696e6b Merge pull request #2742 from aiongg/office-ruler
Text ruler: the tab selector shows in the corner its host gives
2026-11-20 21:26:32 -05:00
aiongg fd652b372d Merge pull request #2738 from aiongg/component-set-productivity
Component sets: Office is named Productivity
2026-11-20 21:19:04 -05:00
aiongg b56b17f63e Merge branch 'rework-dialogs-b' into rework-dialogs 2026-11-21 02:18:12 +00:00
aiongg d73c1c337f A dock window whose groups are all minimized shrinks to its strips
The window's column takes one held-height state shared with the collapsed
column: WindowColumn::held is the content height, and collapsed the strip's
own width. A column whose every group is minimized shows at its rect's place
and width with the title row and strips' height (DockSizes::minimized_height);
its sides resize the width, and WindowColumn::kept keeps the rect's height, so
an OS window's recorded placement and an in-app window's rect keep the
expanded size and a restore gives it back. Stepped columns keep fitting their
content, which already measures minimized groups as strips.

Fixes storytold/photocraft#15862.
2026-11-21 02:14:51 +00:00
aiongg c957090b8b New Document cards: drop the unused Env import 2026-11-21 02:12:02 +00:00
aiongg feceac184b Export As and Save for Web list resample methods in the host's order; New Document: Background Contents before the advanced fields, save icon on the Name row, section captions as a type role 2026-11-21 02:10:34 +00:00
aiongg ad0c2fccc6 Show Image Size and Canvas Size fields at their compact width
A content-sized UnitSelect shows its number field one number cell wide
and its select as wide as its longest unit; a unit select of any other
sizing keeps a field's width and gives the select the room after it.
Image Size's and Canvas Size's Width, Height and Resolution rows are
content-sized, as their fields were before the port.
2026-11-21 02:07:40 +00:00
aiongg bf2d97ba40 Settle a label group when any sweep of its measure read a narrower column
A content-sized stack runs its rows twice in one measuring run: a second
sweep at the width the first found. A row inside a row of the group
(Image Size's Width and Height beside their link) reads the label column
in the first sweep only; the second takes its measure without reading the
column, so its group found nothing unsettled there and overwrote what the
first sweep found. The rows then kept the measure taken at the narrower
column, while the real run read the group's widest and stacked each label
above a field sized for one beside it: the field was cut to a strip.

The group now runs its rows again whenever any sweep found a row that read
a narrower column. Trials: a stack of labelled unit selects in a row of a
content-sized form, and Image Size and Canvas Size on a host, at 1x and
1.25x (photocraft#15483).
2026-11-21 02:02:16 +00:00
aionggandJere Salonen 5d5c729f7a Palette windows follow the app's modal and minimized state
A palette window stands as an ordinary window while an app-modal layer in
another window blocks it, and the modal's window is raised above it once,
by toggling its level (egui-winit ignores Focus for a focused window, and
on Windows a palette made non-topmost stands in front of the main window
otherwise). The palette goes back above the app's windows when the modal
closes (#15525).

A palette window is hidden while the main window is minimized and shown
again when it is restored, on Windows and Linux; on macOS the app stays
active with its main window minimized, and palettes stay (#15860).

One function, WindowLevel::standing, decides a window's level and
visibility from the app's state (focus, app-modal window, minimized main
window), which follow_activity records once per frame. The raise is
WindowAction::Raise.

Supersedes craft-libs#2267, whose design and trial this takes over.

Co-authored-by: Jere Salonen <hi@jere.co>
2026-11-21 02:01:03 +00:00
aiongg af50339b27 Escape keeps the anchor selection under Direct, Convert and Curvature
The overlay no longer clears the selection on Escape; the key goes on to the window as in 0.23.1.
2026-11-21 01:55:29 +00:00
aiongg a32fe7d6fd Option lists: hover moves only the lead
HoverLead (Off, Lead, LeadAndSelection) replaces lead_follows_hover. List::options takes Lead, so the hovered row no longer draws as the chosen option for a frame; UndoList keeps LeadAndSelection.
2026-11-21 01:50:30 +00:00
aiongg b66a60caf8 DocumentWindow: the body takes the window's room and never scrolls 2026-11-21 01:42:09 +00:00
aiongg 0ea84419cd Text ruler: the tab selector shows in the corner its host gives
PageRulers handed the text ruler the canvas's top strip, which starts after the
canvas corner, and the ruler cut its own corner square out of that strip, so the
selector sat one strip depth right of the corner, over the horizontal ruler, and
the corner stayed blank. The host now gives the corner (TextRuler::corner):
Rulers::strips returns it beside the strips, and PageRulers shows the ruler over
the top strip and the corner. The corner follows the host in either direction.

The selector's box is the icon size with the theme's small rounding, in the
column's colour with the state layer under the pointer; the corner continues the
strip round it; the glyph is centred by its own bounds.
2026-11-21 01:34:06 +00:00
aiongg 3eebedfcff Component sets: the productivity set 2026-11-21 01:19:14 +00:00
aiongg 1fac93e295 Merge remote-tracking branch 'upstream/next' into memo-stack
# Conflicts:
#	crates/ui-contract/src/contract/memo.rs
2026-11-21 01:06:55 +00:00
aiongg 3f440d3ff1 Merge pull request #2578 from aiongg/component-constants
Component constants and component sets (creative and office looks, rulers first)
2026-11-20 20:06:24 -05:00
FredApps f1c4dd50c9 Merge pull request #2672 from storytold/fix/registry-fixture-only
Gate downstream UI registrations on the suite feature
2026-11-21 07:39:13 +07:00
David MannandClaude Opus 5.5 c49a12a99d Crop: an edge or corner drag may take a document crop past its bounds
The Crop tool bounds the overlay by the canvas while Delete Cropped Pixels is on so that an
image-mode turn keeps the frame inside the image (photocraft#10869). The drag rules also cut
every edge and corner resize to those bounds, so a crop could not grow the canvas. In the
reference application it does. A resize of a document crop now goes past the bounds; turns,
moves, drawn frames, nudges and a placed picture's crop (bounded by its source) are unchanged.

Fixes storytold/photocraft#16043.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 01:24:29 +01:00