add custom dock

This commit is contained in:
2026-08-19 08:03:07 +07:00
parent 7912dd0a03
commit 6a3e9604c9
23 changed files with 7267 additions and 67 deletions
+2 -3
View File
@@ -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();