Report theme changes to debug API

This commit is contained in:
Héctor Ramón Jiménez 2025-03-13 00:42:28 +01:00
parent 42f5a61809
commit 5f15522368
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 28 additions and 3 deletions

View file

@ -597,6 +597,14 @@ async fn run_instance<P>(
continue;
}
debug::theme_changed(|| {
if window_manager.is_empty() {
theme::Base::palette(&program.theme(id))
} else {
None
}
});
let window = window_manager.insert(
id,
window,
@ -1026,6 +1034,12 @@ async fn run_instance<P>(
window.raw.request_redraw();
}
debug::theme_changed(|| {
window_manager.first().and_then(|window| {
theme::Base::palette(window.state.theme())
})
});
user_interfaces =
ManuallyDrop::new(build_user_interfaces(
&program,