fix(ux): fullscreen navigation (#2117)
* fix(pane): fullscreen navigation in all four directions * fix(pane): use previous method in previous context
This commit is contained in:
parent
0344849717
commit
cf9f806559
2 changed files with 59 additions and 5 deletions
|
|
@ -1452,6 +1452,30 @@ impl TiledPanes {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn focus_pane_left_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
self.unset_fullscreen();
|
||||||
|
self.move_focus_left(client_id);
|
||||||
|
self.toggle_active_pane_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn focus_pane_right_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
self.unset_fullscreen();
|
||||||
|
self.move_focus_right(client_id);
|
||||||
|
self.toggle_active_pane_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn focus_pane_up_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
self.unset_fullscreen();
|
||||||
|
self.move_focus_up(client_id);
|
||||||
|
self.toggle_active_pane_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn focus_pane_down_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
self.unset_fullscreen();
|
||||||
|
self.move_focus_down(client_id);
|
||||||
|
self.toggle_active_pane_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn switch_next_pane_fullscreen(&mut self, client_id: ClientId) {
|
pub fn switch_next_pane_fullscreen(&mut self, client_id: ClientId) {
|
||||||
self.unset_fullscreen();
|
self.unset_fullscreen();
|
||||||
self.focus_next_pane(client_id);
|
self.focus_next_pane(client_id);
|
||||||
|
|
|
||||||
|
|
@ -1543,6 +1543,34 @@ impl Tab {
|
||||||
pub fn are_floating_panes_visible(&self) -> bool {
|
pub fn are_floating_panes_visible(&self) -> bool {
|
||||||
self.floating_panes.panes_are_visible()
|
self.floating_panes.panes_are_visible()
|
||||||
}
|
}
|
||||||
|
pub fn focus_pane_left_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
if !self.is_fullscreen_active() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.tiled_panes.focus_pane_left_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
pub fn focus_pane_right_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
if !self.is_fullscreen_active() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.tiled_panes.focus_pane_right_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
pub fn focus_pane_up_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
if !self.is_fullscreen_active() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.tiled_panes.focus_pane_up_fullscreen(client_id);
|
||||||
|
}
|
||||||
|
pub fn focus_pane_down_fullscreen(&mut self, client_id: ClientId) {
|
||||||
|
if !self.is_fullscreen_active() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.tiled_panes.focus_pane_down_fullscreen(client_id);
|
||||||
|
}
|
||||||
pub fn switch_next_pane_fullscreen(&mut self, client_id: ClientId) {
|
pub fn switch_next_pane_fullscreen(&mut self, client_id: ClientId) {
|
||||||
if !self.is_fullscreen_active() {
|
if !self.is_fullscreen_active() {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1553,7 +1581,7 @@ impl Tab {
|
||||||
if !self.is_fullscreen_active() {
|
if !self.is_fullscreen_active() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.tiled_panes.switch_next_pane_fullscreen(client_id);
|
self.tiled_panes.switch_prev_pane_fullscreen(client_id);
|
||||||
}
|
}
|
||||||
pub fn set_force_render(&mut self) {
|
pub fn set_force_render(&mut self) {
|
||||||
self.tiled_panes.set_force_render();
|
self.tiled_panes.set_force_render();
|
||||||
|
|
@ -1833,7 +1861,7 @@ impl Tab {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
if self.tiled_panes.fullscreen_is_active() {
|
if self.tiled_panes.fullscreen_is_active() {
|
||||||
self.switch_next_pane_fullscreen(client_id);
|
self.focus_pane_left_fullscreen(client_id);
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
Ok(self.tiled_panes.move_focus_left(client_id))
|
Ok(self.tiled_panes.move_focus_left(client_id))
|
||||||
|
|
@ -1855,7 +1883,8 @@ impl Tab {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
if self.tiled_panes.fullscreen_is_active() {
|
if self.tiled_panes.fullscreen_is_active() {
|
||||||
return Ok(false);
|
self.focus_pane_down_fullscreen(client_id);
|
||||||
|
return Ok(true);
|
||||||
}
|
}
|
||||||
Ok(self.tiled_panes.move_focus_down(client_id))
|
Ok(self.tiled_panes.move_focus_down(client_id))
|
||||||
}
|
}
|
||||||
|
|
@ -1876,7 +1905,8 @@ impl Tab {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
if self.tiled_panes.fullscreen_is_active() {
|
if self.tiled_panes.fullscreen_is_active() {
|
||||||
return Ok(false);
|
self.focus_pane_up_fullscreen(client_id);
|
||||||
|
return Ok(true);
|
||||||
}
|
}
|
||||||
Ok(self.tiled_panes.move_focus_up(client_id))
|
Ok(self.tiled_panes.move_focus_up(client_id))
|
||||||
}
|
}
|
||||||
|
|
@ -1898,7 +1928,7 @@ impl Tab {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
if self.tiled_panes.fullscreen_is_active() {
|
if self.tiled_panes.fullscreen_is_active() {
|
||||||
self.switch_next_pane_fullscreen(client_id);
|
self.focus_pane_right_fullscreen(client_id);
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
Ok(self.tiled_panes.move_focus_right(client_id))
|
Ok(self.tiled_panes.move_focus_right(client_id))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue