Add a terminal button to status bar
Co-Authored-By: Petros Amoiridis <petros@hey.com>
This commit is contained in:
co-authored by
Petros Amoiridis
parent
24ba47e75d
commit
929ebd7175
@@ -12,6 +12,7 @@ pub mod searchable;
|
||||
pub mod shared_screen;
|
||||
pub mod sidebar;
|
||||
mod status_bar;
|
||||
pub mod terminal_button;
|
||||
mod toolbar;
|
||||
|
||||
pub use smallvec;
|
||||
@@ -56,6 +57,7 @@ use std::{
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
};
|
||||
use terminal_button::TerminalButton;
|
||||
|
||||
use crate::{
|
||||
notifications::simple_message_notification::{MessageNotification, OsOpen},
|
||||
@@ -584,6 +586,7 @@ impl Workspace {
|
||||
let left_sidebar = cx.add_view(|_| Sidebar::new(SidebarSide::Left));
|
||||
let right_sidebar = cx.add_view(|_| Sidebar::new(SidebarSide::Right));
|
||||
let left_sidebar_buttons = cx.add_view(|cx| SidebarButtons::new(left_sidebar.clone(), cx));
|
||||
let toggle_terminal = cx.add_view(|cx| TerminalButton::new(handle.clone(), cx));
|
||||
let toggle_dock = cx.add_view(|cx| ToggleDockButton::new(handle, cx));
|
||||
let right_sidebar_buttons =
|
||||
cx.add_view(|cx| SidebarButtons::new(right_sidebar.clone(), cx));
|
||||
@@ -592,6 +595,7 @@ impl Workspace {
|
||||
status_bar.add_left_item(left_sidebar_buttons, cx);
|
||||
status_bar.add_right_item(right_sidebar_buttons, cx);
|
||||
status_bar.add_right_item(toggle_dock, cx);
|
||||
status_bar.add_right_item(toggle_terminal, cx);
|
||||
status_bar
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user