voelin-ui: end screenshot runs that have the studio's window open

A screenshot run hid the main window and waited for the event loop to
end, which it does not while another window is visible: with the studio
detached the run never finished. It now quits the event loop itself.

The stream chat keeps scrolling to its end for a moment after a change:
rows are measured as they come into view, so the end moves while the
first scroll reaches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
selikhovandClaude Opus 5.5 committed 2026-10-03 11:40:07 +03:00
1 parent 460024f723
commit 91c221c8b0
2 files changed
+5 -2

No files matched your search

+2
View File
@@ -216,6 +216,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
eprintln!("screenshot failed: {e}");
}
let _ = ui.hide();
// Also when the studio's own window is open.
let _ = slint::quit_event_loop();
}
},
);
@@ -979,14 +979,15 @@ export component StudioChat inherits StudioPanel {
to-end := Timer {
interval: 50ms;
running: false;
// Twice: the rows at the end are measured after the first scroll.
// Again for a moment: rows are measured as they come into view, so
// the end moves while it is reached.
triggered => {
root.tries += 1;
if chat-list.content-height > 0 {
chat-list.content-y = min(0px, chat-list.visible-height - chat-list.content-height);
root.passes += 1;
}
if root.passes >= 2 || root.tries > 20 {
if root.passes >= 6 || root.tries > 30 {
self.running = false;
}
}