Commit Graph
7158 Commits
Author SHA1 Message Date
David Mann 2dd38baf49 RasterDisplay: a region fill past the document, under the picture (photocraft#16185)
Crop's preview of a crop that grows a Background shows the area it adds in the
background colour, as the commit fills it, instead of the checkerboard.
2026-11-21 15:46:10 +01:00
aiongg 7d8b961515 Merge pull request #2756 from aiongg/frame-t3
Model-view-update: overlays and focused views replay; preset lists and menu facts as tracked inputs
2026-11-21 09:05:14 -05:00
David Mann 53d9f8028c Merge pull request #2838 from davidmann4/fix/home-rail-look-before-port
Home layout: the rail's look from before the PhotoCraft port (photocraft#15476)
2026-11-21 15:01:40 +01: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 MannandClaude Opus 5.5 efb06e9951 Home layout: the rail's look from before the PhotoCraft port
The desktop Home layout (`StartScreen::home_layout`) drew its rail with the
dialog button look and inline links: pill New and Open, Home as a filled pill,
Learn and the community links underlined in the link colour, and the page
title as a Display heading. The rail is back to how PhotoCraft drew it before
it moved onto the framework (photocraft#15449):

- New and Open at the control radius.
- Every link a full-width row with its icon: muted at rest, normal under the
  pointer; a URL row opens its URL (its tooltip), a command row fires it.
- The selected row (Home) keeps normal ink and has an accent bar at its
  leading edge.
- The page title as a Heading.

Only the Home layout changes; the other start-screen layouts keep their links.

Part of photocraft#15476

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 11:54:42 +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 45ad4f55d7 FloatingGroup::scale is a declared prop (display scale, pixels per point) 2026-11-21 06:46:13 +00:00
aiongg 5f11477f6d craft-layers: LayerTree::Id's Hash tells distinct ids apart 2026-11-21 06:24:14 +00:00
aiongg e3773a63eb Merge remote-tracking branch 'upstream/next' into frame-t3-fix
# Conflicts:
#	crates/color-ui/src/ui/panel.rs
2026-11-21 06:21:06 +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 1c6eb5e52a ui-contract: the replay audit prints both sides of a shape difference
egui's display names a shape by its rects only, which looked equal when
the fill differed.
2026-11-21 05:50:51 +00:00
aiongg 28d9be1f75 ui-contract: the replay audit compares journal entries as a replay calls them
A replay calls its journal entries unshifted when the shift leaves every
record as it is (a pinned record, one that shows an overlay), as egui's
records do. The audit shifted them anyway, and RecordShift::clip cut the
clip of a menu layer's rows to the clip around the view (TabRow with its
menu open). Entry::at holds the rule for the replay and the audit.
2026-11-21 05:50:51 +00:00
aiongg 6392a66312 ui-contract: a memoized view replays only at the opacity it ran at
A view inside a layer that fades in or out ran at one opacity and its
record holds the faded colours; a replay at another opacity painted them
stale (presets picker list after a pick closes the popover). The opacity
is part of the view's place, as the layer and layout are.
2026-11-21 05:50:51 +00: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 52b875b623 api-map: MenuBarUi::english is a removal; the note names the model's english fields 2026-11-21 04:08:45 +00:00
aiongg c877a0bbe3 craft: the facade's tracked-serde feature, from craft-tracked's optional serde 2026-11-21 04:08:45 +00:00
aiongg 29ce80c9a5 Motion: a tween's last step keeps the run from replay without asking for another frame
A tween that moves in a pass leaves its slot in another state than the run found it in, so a record of the run is not
replayed; only a tween still running asks for a repaint. The last step of a modal's nudge asked for one more frame, so
the dialog nudge trial saw a repaint after the nudge came to rest.
2026-11-21 04:08:45 +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 104a3cdae0 craft-draw: TransformSession::revision moves with the undo steps and the Warp phase, so an app keys what it shows of them on it 2026-11-21 03:20:50 +00:00
aiongg 30e8c7dfe9 Overlay layers: a modal layer's flag sits on its container component's node, which carries the role; the layer root stays a plain container
- report_layer writes the root without the flag; the host marks the layer's own node modal after its body ran, so the
  run's records hold it and a replay adds it again. NodeSpec's modal field goes.
- The layer-root trial runs a modal popover too: the popover's node is modal and the root is not, in the run and in a
  replay.
2026-11-21 03:20:50 +00:00
aiongg 638230bfba Overlay replays: the layer root node has its own id, AccessKit parents stay acyclic, closes and toasts settle
- An overlay layer's root node is `layer_root(P)` = `P.with(Sub("layer"))`, written before the layer's `Area` shows;
  egui hangs the Area, its content `Ui` and the container component under it (root -> A -> P), in the run and in a
  replay. The journaled content-parent registration is gone; openers' `controls` name the root.
- Trials check at every pass end that egui's AccessKit parents hold no cycle (`Context::with_accesskit_parents`).
- A running gesture ends as removed when its component was not shown in the previous pass by a run or a replay,
  read from the memory registry's owner passes, which replays register; the per-component `drawn` stamp is gone.
- A run that dismisses its layer, or whose animation tween moves, is not replayed: its next run reads another state.
- A run that ends holding focus reads `Input::Focus` with `Input::Sent`; a chord capture reads `Input::Sent`.
- The toast queues are a tracked input (`Input::Toasts`, read by `toast::cards`).
- Trials: a popover in a view hangs below its layer root (fails without the root's own id), a toast opening runs its
  view in its frame and then replays with the stack order kept; the overlay trials run with motion off and keep their
  scene in place; craft-menu's labels trial drives a key into the open menu.
2026-11-21 03:20:45 +00:00
aiongg 266b1d10b9 replay::close doc: the layers that block a record 2026-11-21 03:20:45 +00:00
aiongg f418a2a3f7 Memoized views: a view that shows an overlay replays it, and a view holding the focus replays while nothing is sent to it
A memoized view that shows an overlay journals the layer (its Area, layer stack entry, peers, layer content parent)
and replays it pinned where it ran; a view holding focus replays while nothing is sent to it (Input::Sent) and the
focus is where its run left it. Press and safe-rect inputs, queued closes, journaled AccessKit focus, IME caret and
key claims are tracked or journaled. Trials: overlay trials in memo_view.rs and craft-menu's open-menu trial. The
layer root's own id in the next commit keeps egui's AccessKit parents acyclic when these records replay.
2026-11-21 03:20:45 +00:00
aiongg b5c60e4238 egui: storytold/egui next at 8a3c5ecb2 (replayed widgets are used ids, Context::with_accesskit_parents) 2026-11-21 03:20:45 +00:00
aiongg 3e59ee1208 Pattern fill: a swatch carries the host's picture of its tile, which the editor paints; the painter fn and both thumbnails methods go 2026-11-21 03:20:45 +00:00
aiongg a5d0fd7a51 TipEllipse: its parts take the focus on press, as AngleDial's do; the Escape trial focuses the widget with a click and squashes it with Alt+Down 2026-11-21 03:20:44 +00:00
aiongg 7e3b1215a3 design-lint: list PresetSource's MemoProps impl 2026-11-21 03:20:44 +00:00
aiongg 5ef4a8567e Preset sources: lint fixes
- The kept rows key on a tuple of the source and the units; the layer key's MemoProps names it through runtime::egui.
- Named fn types for a source's drop test and thumbnail painter; the export dialogs' sources take their names as
  slices, the named-row stories' name checks arrays.
2026-11-21 03:20:44 +00:00
aiongg b1b10ab735 Brush Preset picker: a rename request runs the view that takes it, the picker opens in its search field, a memoized view keeps its body's column
- Collection requests are a tracked input: request_rename moves it and the item step that takes the request reads
  it, so a pending request runs the memoized view that takes it.
- A preset picker opens with the focus in its search field (the browser's search field is the popover's default
  stop), so its head and list replay while it is open and idle; without a search field, on its first stop.
- A memoized view's layout room keeps whether its body is a content-sized or a given column, as it keeps the content
  axes: a rule that fills the width in a view in a content-sized popover took the open room, not the popover's width.
- Trials: a request runs the taking view once; a view in a popover fills its width as without the view. The escape
  revert trial edits roundness by dragging a dot (a press on the tip widget takes no focus).
2026-11-21 03:20:44 +00:00
aiongg 3e6c273b9d Popover replay trial: the popover's first stop sits outside the view, which replays while nothing changes 2026-11-21 03:20:44 +00:00
aiongg 408a6131a2 Preset picker idle trial: the popover opens with the focus in its search field, the list replays 2026-11-21 03:20:44 +00:00
aiongg 1b62c5687d Preset sources: the remaining framework callers, the popover replay trial and the preset count trials
ParamRows and ParamDialog take a PresetSource for their pattern rows (a hosted dialog's build gives one over owned
inputs); the export and PDF export dialogs, the swatch list (swatch_source, thumbs from the drawn colours), the
gradient palette and Gradient Map picker, the pattern fill editor, the text style picker (style_source) and the Layer
Style dialog (patterns, style presets, contour_source) build their presets from sources. Their painters are fns:
RampSampler, SwatchPainter, ContourSampler. Key types and the model types they are built from are memo props.

A memoized view inside an open popover replays while nothing changes; an open preset picker runs no list row while
nothing changes; a Size drag in the Brush Preset picker runs its head and replays the list.

The Swatches panel's rows stay public as `swatch_rows(groups, words)`, which the source's rows fn calls.
2026-11-21 03:20:44 +00:00
aiongg bae11d7916 Preset lists as sources: PresetSource keys a browser's rows, the list runs as a memoized view
PresetBrowser, PresetPicker, PresetManager and BrushPresetPicker take a PresetSource (the host's
MemoProps inputs and capture-free fns that build the rows and answer can_rename, can_delete,
can_move, accepts and thumb), so the browser's grid or list, its drop zone and row menu run in
a memoized view keyed on the inputs. Rows are kept per inputs and scope units (runtime::derived).
The Brush Preset picker's head and its search-row tools are memoized views of their own; the gear
rows are a fn.

Work in progress: the remaining callers (form dialogs, color-ui, draw gradients and patterns,
text style panel, imaging layer styles) are not moved yet and do not build.
2026-11-21 03:20:37 +00:00