layout: add sidebar toggles and shell toggle control

This commit is contained in:
2026-11-14 16:50:15 +07:00
parent 93860e3c1d
commit ce77809132
2 changed files with 37 additions and 20 deletions
+4 -8
View File
@@ -639,10 +639,8 @@ impl Render for WelcomePanel {
.variant(ButtonVariant::Secondary)
.small()
.on_click(move |_, _, cx| {
layout_left.update(cx, |state, cx| {
let visible = !state.is_left_sidebar_visible();
state.set_left_sidebar_visible(visible, cx);
});
layout_left
.update(cx, LayoutState::toggle_left_sidebar);
}),
)
.child(
@@ -651,10 +649,8 @@ impl Render for WelcomePanel {
.variant(ButtonVariant::Secondary)
.small()
.on_click(move |_, _, cx| {
layout_right.update(cx, |state, cx| {
let visible = !state.is_right_sidebar_visible();
state.set_right_sidebar_visible(visible, cx);
});
layout_right
.update(cx, LayoutState::toggle_right_sidebar);
}),
)
.child(