feat(gui): the company is named once in the frame: a tab, with a hue; its card at the foot; no header, no heading
The tab, the sidebar's header and the Overview's heading all said the company's name side by side. Now the tab is the company's identity (badge and name); the sidebar header and the Overview heading are gone (the summary sentence leads the page, at the theme's heading size); and the status card at the foot of the sidebar opens with a heading row, the badge and the name (the rail shows the badge alone, the name on hover), so "these are this company's books: verified, live" is on every page, at the opposite corner from the tabs. The top of the sidebar is an empty `top_slot` for the assistant's connection state, a later unit. Each company has one of eight badge hues (theme::BADGE_HUES, light and dark) chosen by FNV-1a of the id of its books: a function of the id alone, so it is the same on its tab and its card, after a restart, in any order of opening and on every machine. A test computes the contrast of every hue in both themes: letter 4.5:1, badge 3:1 on each surface it sits on. No figure, date or amount changed. Regenerated: the tall sidebar's shapes and pixel goldens (header gone, links moved up, card heading row, hue) and the eight tabs_* snapshots (hue, Overview lead, the rail's badge). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dce7898e96
commit
1b28da26e6
19 files changed
+721
-88
No files matched your search
@@ -61,6 +61,19 @@ pub fn page_header(ui: &mut Ui, title: &str, subtitle: &str) {
|
||||
ui.add_space(16.0);
|
||||
}
|
||||
|
||||
/// A page that opens with a sentence instead of a title (the Overview:
|
||||
/// the company's name is the tab's, and the status card's, not the
|
||||
/// page's): the sentence at the theme's heading size and weight, the
|
||||
/// first thing on the page.
|
||||
pub fn page_lead(ui: &mut Ui, sentence: &str) {
|
||||
let w = ui.available_width().min(860.0);
|
||||
ui.allocate_ui(vec2(w, 0.0), |ui| {
|
||||
ui.set_max_width(w);
|
||||
ui.label(RichText::new(sentence).font(theme::semibold(20.0)));
|
||||
});
|
||||
ui.add_space(16.0);
|
||||
}
|
||||
|
||||
/// A rounded tag.
|
||||
pub fn pill(ui: &mut Ui, text: &str, fg: Color32, bg: Color32) -> Response {
|
||||
Frame::new()
|
||||
|
||||
Reference in new issue
Block a user