Explore: resizable windows everywhere + content-driven layout (text wrap / self-sizing elements) so custom fonts fit #665

Open
opened 2026-10-11 05:07:12 +00:00 by sky_line · 0 comments
Owner

Explore / feasibility. Most of the viewer's windows and panels are fixed-size XUI layouts: absolute left / top / width / height rects, top_pad / left_pad chains, and labels sized for the default font. With a custom font or a larger font size (FSFontSettingsFile, FSFontSizeAdjustment), text gets clipped, labels overlap controls, and some windows can't be resized to make room. Goal: decide how far we can go toward every window resizable and text that fits whatever the font, and what UI-backend work that needs.

Questions to answer

  1. Inventory of the problem: which floaters and panels are fixed-size (can_resize="false", no follows on children) and which clip with a larger font. A quick automated pass could render every floater at, say, +2 font size and flag clipped or overlapping text. scripts/ci/check_xui.py is a starting point for static checks.
  2. Cheap wins:
    • Make more floaters can_resize with sensible follows flags.
    • Let text boxes wrap (wrap="true", auto-height).
    • Let labels grow into their row.
    • Scroll containers for tall panels, as Preferences already uses.
  3. The real fix, a layout engine in llui: elements that size and space themselves from their content, instead of absolute rects. Options:
    • Extend LLLayoutStack (already a 1-D box layout, with its own perf concern in #359).
    • Add a proper flow/grid container with measure-then-arrange passes: min/preferred size from text metrics and font, wrapping, and alignment.
    • Map XUI onto it incrementally, so old fixed layouts keep working and windows convert one at a time.
  4. Text measurement: wrapped LLTextBox / LLTextBase must report a preferred height for a given width (height-for-width), so containers can lay them out. Check how LLFontGL metrics and our VK UI text path expose this.
  5. Cost, risk and order: which windows to convert first (Preferences, Build, Appearance, chat, People), localisation (other languages already overflow, which is the same problem), and skins/themes (#200, #201).
  • #143 (Preferences rework + search), #410 (Advanced Graphics tabs), #653 (shape editor makeover), #200/#201 (skins), #359 (LLLayoutStack cost).
  • The Photo Studio multi-panel frame (#444) already does content-driven sizing for its sections (setShape after addChild). That's a pattern to generalise.

Deliverable for this ticket

A written plan: the clipping inventory, a recommended layout-engine design, a migration path, and an estimate. Then follow-up tickets.

**Explore / feasibility.** Most of the viewer's windows and panels are **fixed-size XUI layouts**: absolute `left` / `top` / `width` / `height` rects, `top_pad` / `left_pad` chains, and labels sized for the default font. With a **custom font or a larger font size** (`FSFontSettingsFile`, `FSFontSizeAdjustment`), text gets clipped, labels overlap controls, and some windows can't be resized to make room. Goal: decide how far we can go toward **every window resizable** and **text that fits whatever the font**, and what UI-backend work that needs. ## Questions to answer 1. **Inventory of the problem:** which floaters and panels are fixed-size (`can_resize="false"`, no `follows` on children) and which clip with a larger font. A quick automated pass could render every floater at, say, +2 font size and flag clipped or overlapping text. `scripts/ci/check_xui.py` is a starting point for static checks. 2. **Cheap wins:** - Make more floaters `can_resize` with sensible `follows` flags. - Let text boxes wrap (`wrap="true"`, auto-height). - Let labels grow into their row. - Scroll containers for tall panels, as Preferences already uses. 3. **The real fix, a layout engine in `llui`:** elements that size and space themselves from their content, instead of absolute rects. Options: - Extend `LLLayoutStack` (already a 1-D box layout, with its own perf concern in #359). - Add a proper flow/grid container with measure-then-arrange passes: min/preferred size from text metrics and font, wrapping, and alignment. - Map XUI onto it incrementally, so old fixed layouts keep working and windows convert one at a time. 4. **Text measurement:** wrapped `LLTextBox` / `LLTextBase` must report a preferred height for a given width (height-for-width), so containers can lay them out. Check how `LLFontGL` metrics and our VK UI text path expose this. 5. **Cost, risk and order:** which windows to convert first (Preferences, Build, Appearance, chat, People), localisation (other languages already overflow, which is the same problem), and skins/themes (#200, #201). ## Related - #143 (Preferences rework + search), #410 (Advanced Graphics tabs), #653 (shape editor makeover), #200/#201 (skins), #359 (LLLayoutStack cost). - The Photo Studio multi-panel frame (#444) already does content-driven sizing for its sections (`setShape` after `addChild`). That's a pattern to generalise. ## Deliverable for this ticket A written plan: the clipping inventory, a recommended layout-engine design, a migration path, and an estimate. Then follow-up tickets.
sky_line added this to the Slipstream project 2026-10-11 05:07:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#665
No description provided.