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

+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] "
"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,
done_box.c_str(), geom.c_str(), close_tops.c_str(), add_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);
}