mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-06 00:41:16 -05:00
hold debug 2
This commit is contained in:
@@ -96,6 +96,16 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {
|
||||
}
|
||||
});
|
||||
ui.data_mut(|d| d.insert_temp(egui::Id::unique(AREA), scrolled.id));
|
||||
if held.is_some() || ui.data(|d| d.get_temp::<bool>(egui::Id::unique("dbg-hold"))).unwrap_or(false) {
|
||||
eprintln!(
|
||||
"DBGSHOW pass={} held={held:?} start={start:?} final_offset={} content={} inner={} measuring={}",
|
||||
ui.ctx().cumulative_pass_nr(),
|
||||
scrolled.state.offset.y,
|
||||
scrolled.content_size.y,
|
||||
scrolled.inner_rect.height(),
|
||||
ui.is_sizing_pass() || craft::ui::runtime::measure::active(ui.ctx())
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -346,6 +346,7 @@ fn hold_list_in_place(ui: &mut egui::Ui, top: f32) {
|
||||
if on_box || typing {
|
||||
return;
|
||||
}
|
||||
eprintln!("DBGGREW pass={pass} grew={grew} height={height} before={before} offset_data={:?}", ui.data(|d| d.get_temp::<f32>(egui::Id::unique("right-scroll-offset"))));
|
||||
ui.data_mut(|d| d.insert_temp(egui::Id::unique(HOLD), (grew, pass)));
|
||||
// (drawn again at once at the new offset, so the list never shows a frame out of place)
|
||||
ui.ctx().request_discard("the Keyword List holds its place");
|
||||
|
||||
Reference in New Issue
Block a user