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.
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.
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.
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.
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.
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.
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 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.
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 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>
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.
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.