test: the layout probe reads the sidebar's width

`side_w` is the sidebar column's width, and it must be its own request (320) rather than 0. It turned
a report of "I cannot see the right side panel" into `side_w=0` in one run, which is what a reading is
for.

It also shows the shape of the fault: the width is 320 during the first frames and 0 once the window
settles, while the divider sits at 940 and the plot column ends around 752 -- so the paned is not
giving the sidebar any width, whatever the column asks for.

Four attempts to fix that here were each reverted, because each one left `side_w=0`: placing the
divider from the paned's own width instead of an absolute 940, the property form of the paned's
children, re-parenting the column in code, and a code-set size request on the scroller and the column.
The cause is not one of those, and the next step is to read the paned's own width and the column's
parent chain rather than to guess again.
This commit is contained in:
Martino Ferrari committed 2026-10-12 11:06:31 +02:00
1 parent ed82abd405
commit a8c25f0cb3
2 files changed
+9 -2

No files matched your search

+3
View File
@@ -312,6 +312,9 @@ Two lines of the self-check output are assertions in disguise:
— that is how it tells a gesture from its own echo — so a fit that wrote the group alone reads — that is how it tells a gesture from its own echo — so a fit that wrote the group alone reads
back as the zoomed range one frame later. back as the zoomed range one frame later.
- `[layout-probe] <action> rows=N buttons=B done=D done_box=[x,y,WxH] rows_y=[..] close=[..] add=[..] traces=[..]` - `[layout-probe] <action> rows=N buttons=B done=D done_box=[x,y,WxH] rows_y=[..] close=[..] add=[..] traces=[..]`
`side_w` is the sidebar column's width and **must be its own request (320), never 0**: it read 0 while
the divider sat at the window's right edge, which is a panel that is not there. It was 320 during the
first frames and 0 once the window had settled, so read it from a `placed` line rather than the first.
(stderr, `UDPSCOPE_PROBE_LAYOUT_MS`) — **`buttons` must be `2N+1`** while the editor is (stderr, `UDPSCOPE_PROBE_LAYOUT_MS`) — **`buttons` must be `2N+1`** while the editor is
up (one `×` per row, one `+` per boundary) and **0 on the `editor off` line**: the up (one `×` per row, one `+` per boundary) and **0 on the `editor off` line**: the
buttons exist only while the editor does. `done` follows the same rule for the editor's buttons exist only while the editor does. `done` follows the same rule for the editor's
+6 -2
View File
@@ -1536,11 +1536,15 @@ void layout_probe_report(App& a, const char* what) {
} }
} }
std::fprintf(stderr, "[layout-probe] %-12s rows=%d buttons=%zu done=%d done_box=[%s] " std::fprintf(stderr, "[layout-probe] %-12s rows=%d buttons=%zu done=%d done_box=[%s] "
"rows_y=[%s] close=[%s] add=[%s] resize=[%s] traces=[%s]\n", "rows_y=[%s] close=[%s] add=[%s] resize=[%s] traces=[%s] side_w=%d\n",
what, rows, a.layout_buttons.size(), a.layout_done_button != nullptr ? 1 : 0, what, rows, a.layout_buttons.size(), a.layout_done_button != nullptr ? 1 : 0,
done_box.c_str(), geom.c_str(), close_tops.c_str(), add_tops.c_str(), done_box.c_str(), geom.c_str(), close_tops.c_str(), add_tops.c_str(),
resize_tops.c_str(), resize_tops.c_str(),
traces.c_str()); traces.c_str(),
// The sidebar, which is the pane a divider position can silently take away: `side_w`
// must be its own request (320) rather than 0, and `divider` the position the window's
// width less the sidebar's column left it at.
a.side_box != nullptr ? gtk_widget_get_width(a.side_box) : -1);
std::fflush(stderr); std::fflush(stderr);
} }