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
9eba3180b4
commit
ea996f6e7e
16 files changed
+904
-463
No files matched your search
@@ -343,11 +343,11 @@ fn list(ui: &mut Ui, b: &Books, selected: Option<u64>, shell: &mut Shell<'_>) {
|
||||
),
|
||||
);
|
||||
let st = &mut shell.state.journal;
|
||||
ui.horizontal(|ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.add(
|
||||
egui::TextEdit::singleline(&mut st.query)
|
||||
.hint_text(format!("{} Filter events", icon::MAGNIFYING_GLASS))
|
||||
.desired_width(320.0),
|
||||
.desired_width(ui.available_width().min(320.0)),
|
||||
);
|
||||
ui.checkbox(&mut st.hide_steps, "Hide entry-building steps");
|
||||
});
|
||||
@@ -401,20 +401,30 @@ fn list(ui: &mut Ui, b: &Books, selected: Option<u64>, shell: &mut Shell<'_>) {
|
||||
egui::FontId::proportional(15.0),
|
||||
p.muted,
|
||||
);
|
||||
// The timestamp yields to the event when it's tight.
|
||||
let ts = painter.layout_no_wrap(
|
||||
fmt::timestamp(&line.ts),
|
||||
theme::regular(12.0),
|
||||
p.faint,
|
||||
);
|
||||
let ts_w = if rect.width() - 80.0 - ts.size().x - 24.0 >= 200.0 {
|
||||
let w = ts.size().x;
|
||||
painter.galley(
|
||||
egui::pos2(rect.right() - 8.0 - w, y - ts.size().y / 2.0),
|
||||
ts,
|
||||
p.faint,
|
||||
);
|
||||
w + 24.0
|
||||
} else {
|
||||
8.0
|
||||
};
|
||||
widgets::clipped_text(
|
||||
&painter,
|
||||
egui::pos2(rect.left() + 80.0, y),
|
||||
&ev.text,
|
||||
theme::regular(13.0),
|
||||
p.text,
|
||||
rect.width() - 80.0 - 200.0,
|
||||
);
|
||||
painter.text(
|
||||
egui::pos2(rect.right() - 8.0, y),
|
||||
egui::Align2::RIGHT_CENTER,
|
||||
fmt::timestamp(&line.ts),
|
||||
theme::regular(12.0),
|
||||
p.faint,
|
||||
rect.width() - 80.0 - ts_w,
|
||||
);
|
||||
if resp.clicked() {
|
||||
shell.go(Route::JournalEvent(line.seq));
|
||||
|
||||
Reference in new issue
Block a user