From 84de8a88a48c5744f0543672b56290d542f86f90 Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Mon, 8 Jul 2024 11:19:20 +0800 Subject: [PATCH] Fix resize dock not work --- crates/workspace/src/dock.rs | 6 +----- crates/workspace/src/workspace.rs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/workspace/src/dock.rs b/crates/workspace/src/dock.rs index 8d87237d..8c05631e 100644 --- a/crates/workspace/src/dock.rs +++ b/crates/workspace/src/dock.rs @@ -12,7 +12,7 @@ use ui::{theme::ActiveTheme, IconName, StyledExt as _}; const RESIZE_HANDLE_SIZE: Pixels = Pixels(6.); -use crate::Event; +use crate::{DraggedDock, Event}; use super::workspace::Workspace; @@ -394,10 +394,6 @@ impl Dock { } } -#[allow(unused)] -#[derive(Clone, Render)] -struct DraggedDock(DockPosition); - impl Render for Dock { fn render(&mut self, cx: &mut ViewContext) -> impl gpui::IntoElement { if self.visible_entry().is_none() { diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index daff9ce0..cb897281 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -109,7 +109,7 @@ impl FocusableView for Workspace { } #[derive(Clone, Render)] -struct DraggedDock(DockPosition); +pub struct DraggedDock(pub DockPosition); impl Render for Workspace { fn render(&mut self, cx: &mut ViewContext) -> impl IntoElement {