Expand description
Tab strip — horizontal row of tab pills above the input bar / statusline.
Layout (top to bottom in the buffr window):
+---------------------------------------------+
| input bar (when overlay open) |
+---------------------------------------------+
| tab strip — TAB_STRIP_HEIGHT px |
+---------------------------------------------+
| CEF child window (page area) |
+---------------------------------------------+
| statusline — STATUSLINE_HEIGHT px |
+---------------------------------------------+Each tab is a fixed-width pill. The active tab uses the mode-accent
colour at full intensity; inactive tabs are dimmed. Pinned tabs
show a leading * glyph and sort first (sorting is the host’s job;
this widget only renders what it’s given).
The widget owns no state and pulls no winit / softbuffer types into
its public API; like crate::Statusline, embedders pass a raw
&mut [u32] slice each frame.
Loading indicator: a 2-px progress bar at the bottom edge of each
tab. progress >= 1.0 is treated as idle and the bar is hidden.
Structs§
- TabFavicon
- Decoded favicon bitmap, BGRA
u32packed (0xAARRGGBB). Wrapped inArcso cloning aTabViewis O(1). - TabStrip
- Whole-strip render input. Re-create per frame — the widget owns no
state.
paletteis set once on startup fromconfig.themeand drives every colour the widget paints. - TabView
- Per-tab render input.
progress >= 1.0hides the loading bar.
Constants§
- FAVICON_
RENDER_ SIZE - Target favicon side length in the strip, in pixels.
- MAX_
TAB_ WIDTH - Maximum width of a single tab pill in pixels. Beyond this the titles get long enough to be hard to glance at.
- MIN_
TAB_ WIDTH - Minimum width of a single tab pill in pixels. With 8 px gutter the layout falls back to overflow truncation when the strip is too narrow.
- PINNED_
TAB_ WIDTH - Compact width for pinned tabs. Pinned tabs render as a square icon-only pill — no title text, just the favicon (or a fallback initial) — so the user can fit many anchors in a small strip.
- TAB_
STRIP_ HEIGHT - Tab strip strip height in pixels. 34 px gives a 14-px glyph row with comfortable padding above + below plus a 2-px progress bar reserved at the bottom. Bumping this requires the host window to re-layout the CEF child rect.