gui: every screen lays itself out to fit, down to a 360-point tiling slot
Narrow windows overlapped and clipped: the top bar's crumb, date, and search ran into each other; big numbers wrapped mid-figure; tables painted columns over each other; the entry and document panes squeezed their lists to slivers; anything too wide widened the whole page. - Below 1000 points the sidebar becomes an icon rail (names, attention, and integrity checks in tooltips). - The top bar lays out right to left: search shrinks to its icon, the date drops, the crumb truncates. - Pages are pinned to the window width with narrower margins when tight, so one wide thing can't push everything off screen. - Tiles (KPIs, cash accounts, documents) fit as many columns as the width allows, balanced across rows; KPI figures shrink rather than wrap. - Painted tables shrink their amount columns, clip labels with an ellipsis, then scroll sideways rather than overlap. - List/detail splits show only the detail when both won't fit. - Reports: the side list becomes a picker; controls wrap by known width. - Smaller fixes: chart labels thin out, company facts stack, journal timestamps yield, transaction filters become a dropdown. - Min window size drops to 360x400; the screenshot test covers every report, a register, a document, and a journal event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
1 parent
3b274ed853
commit
6fb594ed28
16 files changed
+904
-463
No files matched your search
@@ -83,7 +83,7 @@ pub fn balance_line(ui: &mut Ui, points: &[(NaiveDate, Decimal)], until: NaiveDa
|
||||
);
|
||||
}
|
||||
// X labels: first, last, and a few between.
|
||||
let n_labels = 4;
|
||||
let n_labels = ((plot.width() / 90.0) as usize).clamp(1, 4);
|
||||
for i in 0..=n_labels {
|
||||
let d = first + chrono::Days::new(((days * i as f64) / n_labels as f64).round() as u64);
|
||||
let align = match i {
|
||||
@@ -285,13 +285,18 @@ pub fn bar_chart(
|
||||
color,
|
||||
);
|
||||
}
|
||||
painter.text(
|
||||
pos2(gx + gw / 2.0, plot.bottom() + 6.0),
|
||||
Align2::CENTER_TOP,
|
||||
&g.label,
|
||||
theme::regular(11.0),
|
||||
p.faint,
|
||||
);
|
||||
// Crowded, label every other group (or fewer), counting back from
|
||||
// the latest so it's always labeled.
|
||||
let every = (34.0 / gw).ceil().max(1.0) as usize;
|
||||
if (groups.len() - 1 - gi).is_multiple_of(every) {
|
||||
painter.text(
|
||||
pos2(gx + gw / 2.0, plot.bottom() + 6.0),
|
||||
Align2::CENTER_TOP,
|
||||
&g.label,
|
||||
theme::regular(11.0),
|
||||
p.faint,
|
||||
);
|
||||
}
|
||||
if hovered {
|
||||
let lines: Vec<String> = series
|
||||
.iter()
|
||||
|
||||
Reference in new issue
Block a user