- A preview whose menu has gone (the panel isn't drawn: text deselected,
panel closed) or is closing (Escape, a press outside the menu) is undone
at the start of the frame, before the canvas sees the input: a canvas
drag no longer runs inside the preview's interaction and gets rolled
back with it. The menu also ends the preview in the frame it closes.
- The list fits the popup (it was taller than the popup, which then
scrolled too), so the current family is centred in view on opening;
↑/↓ scroll only as far as needed.
- Type › Font (in-window menu bar): each item keeps room for its sample
after the name, so long family names no longer run under it.
- Rows are listed again only when the query, filters, expanded families,
favourites or font list change, not every frame.
- Samples: one budget per frame across every menu (Type › Font gave each
item its own), at most 8 rendering at once, the worker asks for a
repaint when it is done instead of polling, the cache holds 512, and
one function draws a sample for both menus.
- Font menus use menu_family_list (the hidden-family rule lives there);
FontClass::label is gone (the menu's translated labels are the only
ones).
- Tests: a preview left by a menu that is gone is undone; a press
outside the open menu ends the preview in that frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>