add custom dock
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use assets::CustomIconName;
|
||||
use dock::{DockArea, DockItem};
|
||||
use gpui::prelude::*;
|
||||
use gpui::{Context, Entity, Render, SharedString, Subscription, Window, div, px};
|
||||
use gpui_component::button::{Button, ButtonVariants};
|
||||
use gpui_component::dock::{DockArea, DockItem};
|
||||
use gpui_component::{ActiveTheme, Root, Sizable, StyledExt, Theme, TitleBar, h_flex, v_flex};
|
||||
use signed_state::{Backend, BackendEvent};
|
||||
|
||||
@@ -22,8 +22,7 @@ pub struct Workspace {
|
||||
impl Workspace {
|
||||
pub fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
|
||||
let dock = cx.new(|cx| {
|
||||
DockArea::new("dock", Some(1), window, cx)
|
||||
.panel_style(gpui_component::dock::PanelStyle::TabBar)
|
||||
DockArea::new("dock", Some(1), window, cx).panel_style(dock::PanelStyle::TabBar)
|
||||
});
|
||||
let weak_dock = dock.downgrade();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user