Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

perf(desktop-gpui): lay out the sidebar's scroll body as a block

Paddy44c38bfb97b4
diff --git a/apps/desktop-gpui/src/editor_sidebar.rs b/apps/desktop-gpui/src/editor_sidebar.rs
index aa0b851af..161fb0ec9 100644
--- a/apps/desktop-gpui/src/editor_sidebar.rs
+++ b/apps/desktop-gpui/src/editor_sidebar.rs
@@ -2574,10 +2574,11 @@ impl EditorWindow {
SidebarTab::Captions => self.render_captions_tab(cx),
};
+ // Block, not a flex column: its one child lays out the same, without
+ // the extra layout pass a flex column spends sizing it on every rebuild.
div()
.id("sidebar-scroll")
- .flex()
- .flex_col()
+ .block()
.flex_1()
.min_h_0()
.overflow_x_hidden()