Files
photocraft/crates
Fahad Faruqi b44133c8b3 Document tabs: elide and overflow into a » menu when they are too many (#1276) (#1293)
The document tab strip laid every tab out at its natural width from the strip's
left edge and never clamped it, so once the tabs were wider than the window the
last ones ran off the strip: only a sliver stayed visible, and picking it
showed the document without bringing its tab into view. The dock *panel* strips
solved the same problem in #151 (elide, then a » menu that keeps the selected
tab on the strip); the document strips never got wired to it.

Both document strips now go through `tab_strip::fit`:

- tabs that don't fit shrink — long titles elide with '…' and show the full
  title on hover — and the ones that still don't fit move into a » menu at the
  end of the strip;
- the active document's tab always stays on the strip, and activating a
  document from the menu brings its tab straight onto it;
- files still opening in the background (#210) share the same index space and
  the same menu;
- tabs that fit keep their exact natural widths and the strip shows no menu,
  as before.

The » button is now a shared `tab_strip::overflow_button`, used by the panel
strips too. "More documents" is translated in every catalog.

Tests: `canvas/tabs_tests.rs` drives the whole app with 14 open documents
(Pro and Studio themes) and asserts the tabs stay inside the strip, the menu
holds the rest, and the active document's tab is the one on the strip.
2026-10-08 17:05:31 -04:00
..
2026-10-07 10:20:40 -04:00