A docked stepped column (a tool rail) was clamped to its content's height, so under a docked
toolbar the window background showed instead of the toolbar's surface. The reference
application keeps the docked toolbar's column surface down to the dock's foot, with the tools
at the top. Docked, a stepped column now takes the dock's height like any column; a floating
stepped window stays as tall as its content.
The dividers between docked columns and between a dock and the document area were the inline
gap (6 px comfortable, 4 compact); the reference application's are 3 px at 100%. They are now
the tight gap (3 px comfortable, 2 compact).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupDrag carries the press a rail's grip started it with; a drop that
moves the floating window it is the whole of moves the window by the
pointer's travel from there (kept inside the float area) and keeps its
size, instead of putting its title row under the pointer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grip under a tool rail's column bar starts a drag of the rail's group;
released over empty room it floated the group under the pointer, which the
model refuses for a group that floats already, so a floating toolbar's grip
did nothing. A unit that is a whole floating window now moves that window
under the pointer (Action::MoveFloating), as its title row does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shape.grip in a theme file sets the grips' marks: ticks or dots, how many,
a tick's length, a mark's width and the gap. Each value is optional and
keeps the default, now eleven ticks five points tall (one more mark and
one point taller than the reference application's ten of four). The
theme editor, the writer (unknown keys kept) and the token dumps carry it;
GripMarks paints from the tokens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dock grips drew their marks at 0.83 of the panel colour, as the references do on their lighter
panels; on our dark panels that is #2a2a2a on #323232, almost invisible, and no theme could choose
it. The marks now use a `line.grip` token: by default two steps from the panel (lighter in dark
mode, darker in light mode; Pro dark #474747 on #323232), and a theme can pin its own.
Fixesstorytold/photocraft#16406.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grip strip under a host-shown rail's column bar (#2934) ran its
GroupGrip in every pass, also when the only input was the pointer
moving elsewhere, where the column bars and tab rows replay. It is now
a MemoView held to the strip, keyed by the rail's group, with the drag's
start leaving through an outbox; the group's size goes on the drag
outside the view as the column bar does it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A layer's measuring run lays its body out before the footer runs, so a body
that fills the layer's room (a scrolling list, About's Contributors grab bag)
took the footer's height too. The layer came out taller than its room by the
footer, with empty space under the buttons, and in a small window it ran past
the window's bottom edge.
When what a layer with a footer took is taller than its room, the run is now
taken back and the body laid out again beside the footer that run measured,
as a capped inline body already is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grip above each icon group of a collapsed column was a dotted hairline in a lighter ink than the panel
(7bf0a9b6d, e5e007233). The reference application draws its dock grips as ten upright ticks, one point wide,
four tall and one apart, a little darker than the panel in every interface colour, the same under the pointer.
`GripMarks` paints that row, through the new `Rule::ticks` (the dotted rule is now its square case) and
`Draw::grip_ticks` (exactly `count` marks at every scale).
A tool rail the host shows itself (a panel with a `DockGrid`, taken by `group_view`) now gets a grip strip of
`DockSizes::grip` on top, under its column bar: a `GroupGrip` with the ticks, whose drag moves the rail's group.
The host's view gets the room under it, and the group measures the strip on top of the view's height.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The centred layout drew the blurb, version, community button, link row and
built-with line in one stack at the row gap, and its rows were only as wide
as their content, so nothing was centred and no block stood apart. The
blocks now sit apart by the section gap, and the body and the About tab
take the dialog's width, so the button and the link row centre in it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in craft-libs#2756 (frame-t3), #2810 (a memoized view in a row sits on the row's line) and #2838 (home rail look).
- egui pin and Cargo.lock: rework-d2's egui rev, which contains #2756's; frame-t3's serde line for craft-tracked.
- menu bar: EnglishFn goes with frame-t3's removal of english; rework-d2's docs stay.
- Env::start_view_room: keeps both column flags, then Shrink::Fit when the view fits.
- lazy::Place: both opacity and fits.
- Lazy::run_keyed: a memoized view's room is the row's cap when the row narrows it, else the flow region, and then moves down onto the row's line (on_row_line); the cap is horizontal and the move vertical, and the move keeps the room's size, so a kept run replays moved with it.
#2756 made the browser read its rows from a PresetSource and read the
pointer and the modifiers only for its rows' events, so the browser part
of this branch is next's now. The trial builds its rows from a source
and checks the pointer move only: at rest the browser reads no
modifiers. Its tile view still fails without the tile grid change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same read as in the Layers and Channels panels: pointer::frame(..).mods
notes the pointer as a tracked input, so a memoized view holding the
component ran on every pointer move in the window. pointer::mods returns
the same modifiers and notes only the modifiers. Fifteen more sites read
the frame for its modifiers only (the preset browser, the tile grid, the
section footer, the dock's drop, the canvas guides, the crop tool, the
bins, Color Range, the raw develop dialog, the table conditions, the form dialogs,
Save for Web) and the text style panel; each reads pointer::mods now.
The preset browser also reads the pointer's buttons, press and release
for its rows' events; it reads the frame only when there are events, so
a pass without one does not depend on the pointer.
In PhotoCraft this left Swatches, Gradients, Patterns, Styles, Shapes,
Tool Presets, Character and Paragraph Styles, Brushes and Glyphs running
on every pointer move over the canvas; with the change every docked
panel replays.
Trial: the preset browser in a host view replays on a pointer move
beside it, in its list view (fails without the browser change) and its
tile view (fails without the tile grid change), and Alt held runs it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppKit keeps a window's bottom-left corner when its size changes (winit's
`request_inner_size` is `setContentSize`), so every size the app sent moved
the window's top edge by the height it gained or lost: a collapsed dock
palette expanded by its double arrow grew upward, often past the top of the
screen, and the dock then recorded that place as the user's. `act` follows
each `SetInnerSize` on macOS with the top-left corner the caller knows the
window at.
The test kit gains `AppKitWindow`, which runs window commands as AppKit
does; the macOS dock trials use it. New trials: a palette collapsed and
expanded by its double arrow, and a collapsed palette dragged by its title
row and by its group grip, on a Retina Mac.
Refs storytold/photocraft#15486
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.
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.
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.
- 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).
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.
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.
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.
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.
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.
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.
Fixesstorytold/photocraft#15862.
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).
A collapsed dock window's sides resize its width, and only its width, within the bounds of a docked collapsed column
(DockSizes::iconic_bounds, the one rule both use), on macOS by AppKit and elsewhere by the window's own grips.
FloatingGroupOutput::collapsed_width reports the width, which the area keeps as the column's iconic width through the
docked column's own path (Action::ResizeIconic); names show from IconicSizes::labels as in a docked column. The height
stays the icons', the expanded rect keeps its size and the window keeps its edge. The column in a window has no
inner-edge divider: the window's sides size it, as for an expanded column.