feat: add page surfaces and collapsible sidebar

This commit is contained in:
2026-11-10 16:18:47 +08:00
parent e0eff7755f
commit 82f9256a84
35 changed files with 1480 additions and 1751 deletions
+3
View File
@@ -16,6 +16,7 @@ pub(crate) struct Presentation {
pub tab_ids: Vec<(WeakObjectRef, u64)>,
pub next_tab: u64,
pub last_tabs: Vec<crate::tabs::Tab>,
pub surface: crate::page::Surface,
pub render_cache: crate::snapshot::RenderCache,
pub layout: crate::layout::LayoutRuntime,
pub mounts: crate::mount::MountTable,
@@ -122,6 +123,7 @@ impl Presentation {
tab_ids: Vec::new(),
next_tab: 0,
last_tabs: Vec::new(),
surface: crate::page::Surface::default(),
render_cache: crate::snapshot::RenderCache::default(),
layout: crate::layout::LayoutRuntime::default(),
mounts: crate::mount::MountTable::default(),
@@ -177,6 +179,7 @@ mod tests {
height: 160.0,
});
let root = UiNode {
surface: None,
flex: 0.0,
flex_policy: crate::layout::FlexPolicy::default(),
main_align: crate::layout::MainAlign::Start,