Commit Graph
7142 Commits
Author SHA1 Message Date
aiongg 282d45bb28 Help gives the help line's Text, which its callers show 2026-11-21 11:19:46 +00:00
aiongg 6c72055339 A memoized row unit's room follows the row, not its own content; a call's key is its own
A memoized view the row does not narrow shows as in no room, in the row's flow region, and its content sizes from its
content along x; only a row that narrows it cuts its room to the width it gives. The cap of a view the row did not
narrow was its own counted width, so new content changed the view's room and the discard pass ran it again. The
shrink record carries whether the row narrowed the unit.

The replay decision of a pass covers the kept run; each call compares its own key. A row's counting sweep calls the
view with another key (its content shows unbounded): that call no longer decides the pass against the real call
after it, and a sizing call takes the extent the last sizing run measured for its own key.
2026-11-21 10:42:23 +00:00
aiongg 2ef7bbff38 A field labelled above sits on a row's line by its control, as a control labelled above does
A container labelled above its body reports its body's first control line as the line it sits on in a row, so a
button beside a field labelled above sits level with the field's control, not its label.
2026-11-21 10:33:46 +00:00
aiongg b62b64af52 FloatingGroup::scale is a declared prop (display scale, pixels per point) 2026-11-21 10:20:12 +00:00
aiongg 9bb77ccba4 Preferences docs name host-labelled rows; trials for their search and for a palette's context menu popup 2026-11-21 10:18:40 +00:00
aiongg 69ed953094 Preferences: host-labelled rows show their rule's help and follow its enabled state 2026-11-21 10:18:40 +00:00
aiongg 8983476f09 Memo trial: a view in a shrinking row runs at most once per measuring sweep of the row 2026-11-21 10:18:40 +00:00
aiongg 75e8e49ef5 Overlay placement: only a menu's layer covers its anchor 2026-11-21 10:18:40 +00:00
aiongg 688df999d5 Layout: a labelled control's row takes its place in flow through place_in_cell, its control on the line 2026-11-21 10:18:40 +00:00
aiongg 8db22341b4 A memoized view in a Stack fits its content to its room, as in a shrinking row; the menu bar folds in any Stack 2026-11-21 10:18:40 +00:00
aiongg bb2e565a2e Merge rework-d2d: Info panel, host-labelled rows, page label column, egui text band width 2026-11-21 09:23:35 +00:00
aiongg df6c100b78 Repin egui to storytold/egui next 72cb386ac: a word laid out in room equal to its width keeps its width
egui's galley cache rounded a finite wrap width to whole points and then
clamped the reported width to it, so "200" (22.47 pt) laid out at 22.47 came
back 22.0 and an Info readout row stacked under its label. The fork rounds to
GUI_ROUNDING instead.

The repin also brings next's two commits ahead of the old pin (AccessKit
parent map reader, replayed widgets as used ids).

Trials: ui-contract text::band (a word in room equal to its width, Wrap and
Elide, at 1x and 2x) and the Info panel trial at G=200, K=44%.
2026-11-21 09:23:14 +00:00
aiongg dfe6c94183 A memoized view is a unit of the shrinking row around it; the menu bar takes its titles' width (photocraft#15533)
A memoized view's content started a layout room of its own that cleared the row's shrink step, so a view in a row
took the row's whole remaining room. The in-window menu bar, a memoized view that filled X, then ate the title bar's
gap and the document title was never drawn.

A memoized view in a shrinking Row is now one of its units, as a body unit is: it reports what its content takes in
no room in the counting sweep and what it takes with every leaf at its least in the least probe, and shows at most
the width the row gave it. That width is the room of its place, so a new width runs the view and an unchanged one
replays; whether the view is a row unit is a fact of its place too. Its content's leaves fit that room.
Env::local_mut clears the cached scope key, so a sweep that edits its scope keys again.

MenuBar no longer fills: it measures every title's width, and the "…" title alone as its least, so a short row
narrows it and the last titles fold into "…".
2026-11-21 09:02:19 +00:00
aiongg c1bf37c69d Preferences: one label column per page across its groups; AppearancePage rows join it 2026-11-21 08:51:55 +00:00
aiongg e576f99df7 Preferences: custom rows whose host draws its own labels (RowKind::CustomRows, SettingRule::custom_rows) 2026-11-21 08:51:15 +00:00
aiongg 9bafed916f Info panel: two aligned halves per block, % after CMYK, rules between blocks 2026-11-21 08:47:14 +00:00
aiongg 03cf32f21b Options bar: icon-only buttons draw at the tool size (photocraft#15536) 2026-11-21 08:05:19 +00:00
aiongg 57a1de2594 cargo fmt: layout exports 2026-11-21 08:03:17 +00:00
aiongg 4e965a7638 NumberCodec writes a value that rounds to zero without a sign (photocraft#15548) 2026-11-21 08:01:10 +00:00
aiongg d2a5ebe4a9 Layout: a labelled control's row and place_in_cell share one centring rule (photocraft#15536) 2026-11-21 08:01:10 +00:00
The Daniel 5bb2886281 Labelled controls sit on the bar's line like other controls
A check box or radio with its label after it was placed at the top of
the room, while every other control is centered on the row's line. In
an options bar shown in a slot shorter than it asks for (36pt where the
bar wants 40), the check box stood at the bar's top edge, 6pt above the
fields beside it. It now sits on the row's line, and a tall room no
longer makes its row taller.
2026-11-21 07:58:25 +00:00
aiongg 7a6827f5bf Overlay placement: a menu hung at a point also covers its anchor (photocraft#15552)
Most context menus hang from Anchor::Point (table header, rulers, ribbon,
places, versions, dock group menu). layer_covers_anchor decides every case in
one place: the pointer, the rect a context request named, and a point for a
layer whose key class is OwnerClass::Menu. Point-anchored layers that are not
menus (the iconic flyout, a popover at a point) keep their rule.

docs/contract-api.md regenerated.
2026-11-21 07:57:24 +00:00
aiongg 2126170565 Overlay placement: a context menu that fits neither side covers its anchor (photocraft#15552)
PlaceRequest gains covers_anchor. Below or above the anchor, an overlay with it
that fits on neither side but fits the bounds keeps the preferred side and its
height and slides over the anchor; only one taller than the bounds is capped.
The overlay host sets it for a layer hanging from the pointer or from the rect
a context request named, so placement's room and the first pass's content room
are the cap within the bounds, and the menu shows every row without scroll
strips. Dropdowns, menu-bar menus and submenus keep their rule.
2026-11-21 07:48:59 +00:00
aiongg fb45d473df Dock workspace: tabs closed together reopen together (photocraft#15545)
When one apply_all batch closes several tabs of a group (Close Tab Group, or a
preset that closes panels one at a time), each closed panel's Location records
the set in closed_with. Reopening any of them restores the set in group order,
each by its own record, with the requested one in front. A tab closed in a
batch of its own stays closed: the set only counts members whose records name
each other.
2026-11-21 07:42:39 +00: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