ui: the readouts strip is also shown in a collapsed window

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Sonnet 4.6 committed 2026-11-03 10:50:55 +01:00
1 parent 3526ce0541
commit 1d144663b9
4 files changed
+36 -22

No files matched your search

+8 -4
View File
@@ -4013,10 +4013,14 @@ gboolean tick(gpointer user) {
app->sidebar_syncing = false;
}
}
// The readouts strip is on screen exactly when the dock is not. Decided here, right after the wish was
// re-asserted and *before* the collapsing below (which makes the split view write `show-sidebar`
// false itself until the next frame re-asserts it): read after it, the strip would show for one frame
// each time the window narrowed.
// The readouts strip is on screen when the dock is not beside the plot: `!show-sidebar || collapsed`.
// Decided here, right after the wish was re-asserted and *before* the collapsing below (which makes
// the split view write `show-sidebar` false itself until the next frame re-asserts it): read after
// it, `show-sidebar` would be that transient false. The strip reads `collapsed` too, and here that is
// the previous frame's value (`set_collapsed()` follows): on a collapse or a widening the strip
// changes one tick after the split view does, but never to a wrong state -- `show-sidebar` is always
// the re-asserted wish and `collapsed` a settled value -- so it does not flash. Moving the call after
// `set_collapsed()` would bring back the transient `show-sidebar` for nothing.
sync_readouts_strip(*app);
const int window_w = gtk_widget_get_width(app->window);
if (window_w > 0) {