layout: add sidebar toggles and shell toggle control
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user