feat(gui): the tab bar spans the window above the sidebar; tabs carry a badge and a name

A tab is the top level (D-78): the sidebar, with its badge, pages and
status, is the company in the tab, so the bar now runs across the whole
window above it. The bar's height (tabs::BAR_H) is taken from the window:
the four sidenav tests that size a window for the sidebar add it, through
that constant, and the smallest window is 400 points plus the bar. The
sidebar below the bar is pixel for pixel the old 1440x920 golden image;
only its shapes hash moved, with the shapes lower by the bar.

Tabs are as wide as badge plus name between a least and a greatest width,
the name elided with the full name in the hover; the one in front is the
lit surface with the accent bar, open at its foot. Room is left before the
close control for a later state mark. The + follows the last tab (at the
right edge, whole, when the tabs scroll), says 'Open a company' on hover,
and lists companies by remembered name with the id beside it; a name is
remembered when a company's books load (company.<id>.name) and titles a
tab before its books load.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-20 11:41:10 -07:00
1 parent d7358b605b
commit 80a24a6262
17 files changed
+531 -140

No files matched your search

+4 -3
View File
@@ -22,7 +22,7 @@ mod prefs;
mod receipts;
mod scheme_menu;
mod schemes;
mod tabs;
pub mod tabs;
#[cfg(test)]
mod test_support;
mod theme;
@@ -140,8 +140,9 @@ pub fn run(
.with_app_id("wanderbooks")
.with_inner_size([1440.0, 920.0])
// Small on purpose: tiling window managers hand out small slots
// regardless, and every screen lays itself out to fit.
.with_min_inner_size([360.0, 400.0]),
// regardless, and every screen lays itself out to fit. The
// height is the window's below the tab bar (tabs::BAR_H).
.with_min_inner_size([360.0, 400.0 + tabs::BAR_H]),
// The platform's place for app settings, never the books' folder
// (prefs.rs).
persistence_path: prefs::prepare(),