mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-27 02:22:55 +00:00
craft-ui-panels: note why the dock's tab row and column bar replay at rest
This commit is contained in:
@@ -114,7 +114,8 @@ pub(in crate::docking) fn show_bar<P: Clone + Hash + Send + Sync + 'static>(
|
||||
let mut sent = Vec::new();
|
||||
ui.scope_builder(UiBuilder::new().max_rect(band), |ui| {
|
||||
let props = BarProps { expanded, auto_collapse, arrow, icons, unit, active, ghost, name, sent: Outbox::new(&mut sent) };
|
||||
// Keyed by its column's scope id: unique among the bars of a scroll area's columns.
|
||||
// Keyed by its column's scope id: unique among the bars of a scroll area's columns. As for the tab row, the env
|
||||
// around it holds only values its key follows, so it replays at rest.
|
||||
let _ = MemoView::new(ui.scope_id(), props, column_bar::<P>).show(ui);
|
||||
});
|
||||
for event in sent {
|
||||
|
||||
@@ -532,6 +532,8 @@ impl<P: Clone + Hash + Send + Sync + PartialEq + Debug + 'static> Container for
|
||||
size: self.size,
|
||||
sent: Outbox::new(&mut sent),
|
||||
};
|
||||
// The env around the tab row holds only values its key follows (the shell, the dock's arrangement, a
|
||||
// floating window's layer), no handle or context rebuilt each pass, so it replays at rest.
|
||||
MemoView::new(("tabs", cx.id), row, tab_row::<P>).show(ui)
|
||||
})
|
||||
.inner;
|
||||
|
||||
Reference in New Issue
Block a user