In progress, working on building out the dock UI experience
This commit is contained in:
parent
b9a6336995
commit
d87fb20170
2 changed files with 65 additions and 10 deletions
|
@ -18,7 +18,7 @@ use client::{
|
|||
};
|
||||
use clock::ReplicaId;
|
||||
use collections::{hash_map, HashMap, HashSet};
|
||||
use dock::{Dock, DockPosition};
|
||||
use dock::{Dock, DockPosition, ToggleDock};
|
||||
use drag_and_drop::DragAndDrop;
|
||||
use futures::{channel::oneshot, FutureExt};
|
||||
use gpui::{
|
||||
|
@ -980,15 +980,19 @@ impl Workspace {
|
|||
|
||||
cx.emit_global(WorkspaceCreated(weak_self.clone()));
|
||||
|
||||
let dock = Dock::new(cx);
|
||||
|
||||
let left_sidebar = cx.add_view(|_| Sidebar::new(Side::Left));
|
||||
let right_sidebar = cx.add_view(|_| Sidebar::new(Side::Right));
|
||||
let left_sidebar_buttons = cx.add_view(|cx| SidebarButtons::new(left_sidebar.clone(), cx));
|
||||
let toggle_dock = cx.add_view(|cx| ToggleDock::new(Arc::new(dock), cx));
|
||||
let right_sidebar_buttons =
|
||||
cx.add_view(|cx| SidebarButtons::new(right_sidebar.clone(), cx));
|
||||
let status_bar = cx.add_view(|cx| {
|
||||
let mut status_bar = StatusBar::new(&pane.clone(), cx);
|
||||
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
|
||||
});
|
||||
|
||||
|
@ -996,8 +1000,6 @@ impl Workspace {
|
|||
drag_and_drop.register_container(weak_self.clone());
|
||||
});
|
||||
|
||||
let dock = Dock::new(cx);
|
||||
|
||||
let mut this = Workspace {
|
||||
modal: None,
|
||||
weak_self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue