mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-01 06:16:46 -06:00
`Popover` is the one card detached panels draw on: a header 40 points high with the title 16 in from its left edge and a 24-point X 8 in from its right, a hairline under it, the theme's popup shadow, and one slot. Its measurements are our own — the colour picker's header, which it now uses — not another product's. The colour picker and the style picker move onto it in this commit; each keeps only its own body. The style picker keeps its dark surface through `Surface::Menu`, and its tools row (view, detach, create) now starts the slot, under the shared title. Closing is the widget's now: the X, Escape, and a press outside it — except in the rects the caller holds out (the button that opened it, a popover it opened in turn), so that button's own click can toggle it shut instead of the press closing it and the release opening it again (the bug #730 has). The colour picker keeps its old habit of staying open while the panel beside it is used. Tests: press-and-release for the X, for a press on the opener (open) and for a press elsewhere (closed), plus Escape, the opening rule, the lift and the drag.