T11: the Workspace key context sits above the focus root, so the column toggles work after a press on a blank column or a header
This commit is contained in:
1 file changed
+17
-17
+17
-17
@@ -118,22 +118,22 @@ impl Render for Workspace {
|
|||||||
if settings.show_panel {
|
if settings.show_panel {
|
||||||
shell = shell.column(ShellColumn::new("panel").width(width));
|
shell = shell.column(ShellColumn::new("panel").width(width));
|
||||||
}
|
}
|
||||||
ResizeBorder::new().child(
|
// The context sits above the focus root, so its keys work wherever focus is.
|
||||||
FocusScope::new(&self.focus).root().size_full().child(
|
div()
|
||||||
div()
|
.size_full()
|
||||||
.size_full()
|
.key_context(CONTEXT)
|
||||||
.key_context(CONTEXT)
|
.on_action(cx.listener(|this, _: &ToggleSessions, _, cx| {
|
||||||
.on_action(cx.listener(|this, _: &ToggleSessions, _, cx| {
|
this.toggle(
|
||||||
this.toggle(
|
|settings| settings.show_sessions = !settings.show_sessions,
|
||||||
|settings| settings.show_sessions = !settings.show_sessions,
|
cx,
|
||||||
cx,
|
)
|
||||||
)
|
}))
|
||||||
}))
|
.on_action(cx.listener(|this, _: &TogglePanel, _, cx| {
|
||||||
.on_action(cx.listener(|this, _: &TogglePanel, _, cx| {
|
this.toggle(|settings| settings.show_panel = !settings.show_panel, cx)
|
||||||
this.toggle(|settings| settings.show_panel = !settings.show_panel, cx)
|
}))
|
||||||
}))
|
.child(
|
||||||
.child(shell),
|
ResizeBorder::new()
|
||||||
),
|
.child(FocusScope::new(&self.focus).root().size_full().child(shell)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user