Muse bf50641662 Fix set_bounds for Chart/Indicator widgets (drew at 0,0 after a move)
ChartWidget and IndicatorWidget draw through an inner XGraph /
IndicatorWidget with its own state + PlotView, created at the
construction bounds. The Widget::set_bounds default only updated the
outer state, so after demo/layout called set_bounds(40,40,...) all
250 Indicator + 36 Chart widgets still drew at the top-left corner.
The runner masked it (whole-window draw metric + clicks landing
inside both rects); the pixel-diff crop exposed it (IndUpDownRatio
and IndUpDownVolumeRatio looked blank only because their 150x36
crop did not overlap the misplaced drawing at all).

Fix: Widget::set_bounds now calls a sync_bounds() hook (default
no-op); Chart/Indicator override it to propagate bounds to the
inner state + view. XGraph already synced its view; XSpreadsheet
draws from state only. Regression test
set_bounds_moves_widgets_to_their_rect places every widget at
(40,40) on a Canvas and asserts it paints inside its rect and
nothing at the origin (verified: fails without the fix).
2026-11-29 07:47:36 +00:00

lightgui_rust — LightGUI ported to Rust

Rust port of LightGUI (HEAD eb0b5fc): a C++/GTK form designer with 547 XFrame widgets. See PORTING_PLAN.md for the survey and module map.

Workspace

Crate C++ source Status
crates/lightgui-core src/model.h, src/props.h, src/events.h, src/project_io.cpp, canonicalize() in src/main.cpp done
crates/lightgui-gen src/generator.cpp / src/generator.h (emits C++/GTK, byte-identical) in progress
crates/lightgui-debug src/debugger.cpp / src/debugger.h (GDB/MI) in progress
crates/lightgui-support data extraction (registry, palette, indicators) in progress

probe/ is the step-0 crates.io probe (standalone, excluded from the workspace). data/ / tools/ are generated data + extraction tooling.

Build / test

cargo test    # workspace; rustc/cargo are login-shell-only: use `bash -lc`
cargo build   # must be warning-free (the C++ build was zero-warning)

Rust 1.100.1 stable, GTK 3.24 (gtk-rs 0.18), serde/serde_json 1.0.

S
Description
No description provided
Readme
2.4 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 92.6%
Python 6.6%
Shell 0.5%
C++ 0.2%
Makefile 0.1%