forked from 1b-agent/opencadstudio-upstream
DensitySwap now takes a third, narrowest variant: the compact panels flex-wrapped (via WrapFlow) across as many rows as the width needs. The tool area therefore degrades full -> compact -> wrapped as the window shrinks. build_tool_row becomes build_tool_groups, returning fixed-height panel elements so they lay out identically in a row or a wrap flow. The tool bar is no longer a fixed TOOL_BAR_H; DensitySwap reports its measured height into a cell and the ribbon dropdown overlays anchor at tab_bar_height() + tool_bar_height() so they track the taller bar. Second stage of the adaptive tool area (shrink -> wrap -> collapse). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>