Commit Graph
7121 Commits
Author SHA1 Message Date
aiongg 0afbb57410 A dialog answer that closes the question has its own role, so Windows orders Yes, No, Cancel 2026-11-21 08:02:56 +00:00
aiongg 7fb78caf54 Levels fields size from the number field's own value width 2026-11-21 08:02:56 +00:00
aiongg 3a8c030cc4 Pictures sized from their least are held children of a content column
A picture (`MeasureCx::picture_width`) in a content-sized Stack column takes its least in the column's measuring run,
which offers no room, and shows across the width the column settles on. A square picture was then taller in the real
run than its column had measured it, and everything under it was pushed past the column's end: the Curves dialog lost
its tone bar, the Input/Output fields and the hint (photocraft#15543).

Such a picture now reports itself held in the column's first sweep, in the same held record fill-width children use,
with its kind (`HeldKind::Picture`). The column sweeps again at its settled width, where the picture is offered that
width as room, so it measures at the width it shows. This covers the colour wheel and disc too.

Trials: the hosted Curves dialog shows the graph with its tone bar, Input, Output and the hint inside the dialog; a
square picture in a content column pushes what follows below its shown size; a column sweeps again only for a
picture narrower than it.
2026-11-21 07:49:27 +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
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 Mann eb8e6c98e9 Merge pull request #2682 from davidmann4/fix/crop-idle-frame-keys
Crop: O, I, X and Shift+O stay the app's over the untouched frame
2026-11-21 01:04:44 +01:00
Martin Ball 05acb5587f Merge pull request #2566 from storytold/fix/7149-items2-3-start-cards
ui-shell: start-screen cards take the app's picture shape, size and paper; card tiles frame all four sides
2026-11-21 00:01:28 +00:00
Martin Ball aaa87b5754 Merge pull request #2568 from storytold/fix/7149-item7-top-clamp
pages: one rect for the page view and its canvas, so the page no longer jumps at the top with rulers on
2026-11-21 00:00:26 +00:00
aiongg 241990270c Docking tests from next: the workspace through its accessor and Arc 2026-11-20 23:44:01 +00:00
aiongg 5062108d5b Format the testing exports 2026-11-20 23:38:59 +00:00
aiongg d202ab2fec Merge remote-tracking branch 'upstream/next' into memo-stack
# Conflicts:
#	crates/ui-contract/src/testing/mod.rs
#	crates/ui-panels/src/docking/targets.rs
#	crates/ui-patterns/tests/it/docking/floating_area.rs
2026-11-20 23:37:01 +00:00