Commit Graph
7142 Commits
Author SHA1 Message Date
aiongg 45ad4f55d7 FloatingGroup::scale is a declared prop (display scale, pixels per point) 2026-11-21 06:46:13 +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 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 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
aiongg 000a091d4b craft-menu: English names on the menu model, the MenuBarUi::english hook goes 2026-11-21 03:20:37 +00:00
aiongg 6eae28f167 craft-tracked: From<T>, value equality and an optional serde feature for Tracked
A Tracked field inside a derived PartialEq or serde type (a brush's tip inside its settings) compares by value and
saves as its value; a loaded one starts a new source.
2026-11-21 03:20:37 +00:00
aiongg d37c886c2d Memoized views: rustfmt 2026-11-21 03:20:37 +00:00
aiongg 5734238622 Memoized views: the view's content keeps the axes the enclosing body sizes from its content
A memoized member of a bar whose content held a vertical rule took the bar's whole open room as its height: the
view's layout room started with no content-sized axes, so a child that fills took the room. The room keeps the
enclosing body's content axes (they join the scope key), so the view takes what its content used, as without the
view. Trial: a bar with a memoized member is as high as the bar with the same content shown plainly.
2026-11-21 03:20:37 +00:00
aiongg a94a95107f Memoized views: a held press engages a view only where its layer is the top layer at the press origin
A drag on a popover over a memoized view ran the view on every move: the press half of lazy::engaged asked only
whether the press origin lay in the view's rect. It now asks whether the view's layer is the top layer there, as the
pointer half does through rect_contains_pointer. Trial: a drag on a popover's slider over a view replays the view.
2026-11-21 03:20:37 +00:00
aiongg da74cd2c85 craft-color-ui: MemoProps on the Color panel's settings, mode and ramp 2026-11-21 03:20:36 +00:00
aiongg 3502761b89 craft-draw, craft-ui-patterns: MemoProps and PlainData on the paint bar, brush picker, symmetry and preset view types
PaintValues drops the size and the hardness: the bar shows neither (the preset picker before it does), so a view over it keys only on what it shows.

The gradient tile, its style and its focus outline are memo props too: a gradient item carries its tile.
2026-11-21 03:20:36 +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