One command rebuilds every examples Widget.cpp, re-renders it under
Xvfb, and diffs the screenshot against its golden with ImageMagick
RMSE (0.5 pct threshold):
tools/visreg/run.sh (also: make visreg)
Reuses the cdoc docs sweep render path (same g++ flags, same
Widget - XFrame demo window capture with the root-capture fallback).
Goldens vendored from /opt/lightgui-docs/shots (Dec 2, 2026). Report goes
to tools/visreg/report/report.txt (plus report.tsv and shots/); exit code
is 0 only when every gated widget passes.
Two deliberate behaviours, both documented in tools/visreg/README.md:
- failed shots are retried 3x (transient XOpenDisplay flakes; the docs
sweep needed a retry pass for the same four widgets)
- TTimeEdit, TDateEdit and TCalendar render the wall clock, so they are
reported SKIP (RMSE recorded, not gated) instead of FAIL
Baseline full run (Dec 2, 2026, HEAD beec92b): 544 PASS, 3 SKIP, 0 FAIL;
max RMSE among PASS 0.0000 pct (every passing widget pixel-identical).
The Rust generator needs the same capability/background tables in Rust
syntax (PHASE4_CAPS / PHASE4_BG_COLOR in crates/lightgui-gen/src/
gen.rs); the C++ modes emit C++ syntax, so add Rust-syntax modes.
registry.h gains 8 Phase 4 IWidget virtuals (set_named_color/double/int/
bool/string, set_y_range, set_anchor, set_value_str), one SFINAE trait per
distinct Stock/Instrumentation setter, and Holder overrides with if-chains
over (prop -> setter). The named dispatch keeps the virtual count flat
while covering all 116 Phase 4 prop names.
gen_registry.py was stale: regenerating it deleted the hand-added Phase 2
colour virtuals and the whole Phase 3 block. tools/port_registry_blocks.py
ports those 60 virtuals/traits/overrides back into the template (verified:
regeneration is a byte-identical no-op) and inserts the Phase 4 blocks, so
registry.h is generated again, not hand-edited.
8 tank widgets gain set_alarm_hi_hi/hi/lo/lo_lo (member bands_);
StockSectorComparison gains set_labels_text (pipe-separated labels);
InstControlPanel gains set_grid_rows/set_grid_cols. tools/gen_phase4_props.py
parses the C headers and emits the per-widget Inspector tables (C++ and
Rust) plus the generator capability table from one source of truth.
- tools/gen_palette_icons.py draws all 36 glyphs (PIL, same style as
CWidgets icons: ink + section accent, white turned transparent) into
icons/<Key>.png; tools/verify_palette_icons.py checks 36/36 distinct.
- src/main.cpp: palette_attach_icons() puts a GtkImage left of each
button label (icons/ with ../icons/ fallback, text-only if missing);
self-test asserts 36/36 icons, palette 250x780, no scrolling.
- Fixed the round-3 tight CSS, which never applied: the builder id is
not the widget name (it stayed GtkWindow), and the per-widget style
provider never reached the buttons. Name is now set explicitly and
the provider is screen-wide (selector still scopes it to the palette);
button labels 9pt so icon + label fit the 250-wide window.
- tests/palette_icons_tests.sh (13 checks) + Memo click coordinate fix
in tests/palette_window_tests.sh for the shorter rows.
- screenshots 15 (palette with icons) + 16 (three windows with icons).