N7 — The develop column docks under the photograph on a tall window #51
Notifications
Due Date
No due date set.
Reference: dtourolle/DarkRoom#51
Reference in New Issue
Block a user
On a tall window the develop column moves from beside the photograph to under it. The rail stays on the left, the column keeps its contents, its collapse and its toggle, and the layout class is untouched. Decision D-N7 in
docs/ui-navigation.md.Why
On the tablet's 25:16 panel in portrait, the column beside the canvas leaves a 3:2 photograph 540 × 360. Under it, the same photograph gets 900 × 600. The portrait frame gains too (1.4× the area), so this is not a landscape-only trade.
Deliverable, three parts
The flag.
window-resizedinapp.slintreports height as well as width.apply_layout_classderives a third property,column-below, from the aspect with hysteresis (enter above about 1.25, leave below about 1.15 — the point is that a window resized across square does not flap) and sets it besidelayout-classandpanel-max-width. It is not a layout class andPanelChoicesdoes not learn about it.The frame. The
HorizontalLayoutholdingToolRail,canvas-areaanddevelop-columnbecomes aRectangle; each child takesx,y,widthandheightfrom the flag. Rail full height on the left in both cases. With the flag off the geometry is what the layout produced, to the pixel. With it on, the column isdock-heighttall and runs from the rail's edge to the window's; the canvas has what is left above.panel-visiblecollapses the dock to zero height as it collapses the column to zero width. Do not duplicate the column subtree under twoifs — see the binding-loop notes in the file.The contents, as a stopgap. The stack stretches to the dock's width: the Flickable's viewport width follows the dock. Nothing is reflowed; N9 does that.
dock-heightgoes inui/dr-ui/style.yamlbesidepanel-width, 480 until N6 says otherwise, read asTheme.dock-height.Acceptance
Spec:
docs/ui-navigation.mdD-N7 and N7. Screenshots need XWayland on this machine.Implemented on branch
dev/portrait-dock(commits0e06538,04d8090), merged intointegrate/portrait-dock. Aspect flag with hysteresis (enter 1.25, leave 1.15) set from Rust; the frame is a Rectangle with the rail, canvas and column placed by coordinate;dock-height480 in style.yaml. Verified on the merged branch: 639 dr-ui tests pass, clippy clean, and screenshots at 1500x720, 950x950 and 850x1131 logical show the column beside, beside and docked respectively, landscape unchanged. Not yet checked on the tablet.Landed on master as
5f0b11canddd14243(rebased copies of0e06538/04d8090), with D-N7 inde32c04:column_belowwith 1.25/1.15 hysteresis and tests inlib.rs, the coordinate frame inapp.slint,dock-heightinstyle.yaml. Verified on desktop at three sizes. The tablet check depends on the measurement in #50 and is tracked there.