mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-31 15:48:33 +00:00
The ≡ menu of a panel in its own OS window ("Move Panel to New Window")
was a root-layer Area drawn by the main window's pass at window-local
coordinates, so it opened in the main window at the wrong place.
The open menu now remembers the viewport that owns the click and is
drawn by that viewport's pass (after the window's last panel body); the
main window draws only its own panels' menus. The menu takes at most its
window's width (a floated panel can be narrower than the menu), a press
in another window dismisses it, and a menu left behind by a window that
closed is dropped.
Ports the FilmCraft fix (filmcraft#3633).
Tested: new unit tests in panels.rs run passes of two viewports against
one context: the menu is drawn in the owner's pass and not the main
window's, a main-window menu stays there, a 160 pt window holds the
menu, a press in another window closes it, and a closed window's menu is
dropped. effectcraft-ui-egui lib tests (387), clippy -D warnings, fmt.