diff --git a/Cargo.lock b/Cargo.lock index 825ceea..928662a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1800,6 +1800,7 @@ dependencies = [ "gpui", "gpui-base", "gpui-component", + "signed_ui", ] [[package]] @@ -7934,6 +7935,19 @@ dependencies = [ "utils", ] +[[package]] +name = "signed_ui" +version = "1.0.0" +dependencies = [ + "assets", + "futures", + "gpui", + "gpui-base", + "gpui-component", + "log", + "signed_core", +] + [[package]] name = "simd-adler32" version = "0.3.10" @@ -10763,6 +10777,7 @@ dependencies = [ "signed_core", "signed_git", "signed_state", + "signed_ui", "utils", ] diff --git a/crates/dock/Cargo.toml b/crates/dock/Cargo.toml index 6009a56..b6c512e 100644 --- a/crates/dock/Cargo.toml +++ b/crates/dock/Cargo.toml @@ -9,6 +9,7 @@ publish.workspace = true gpui.workspace = true gpui-component.workspace = true gpui-base.workspace = true +signed_ui = { path = "../signed_ui" } [dev-dependencies] gpui = { workspace = true, features = ["test-support"] } diff --git a/crates/dock/src/lib.rs b/crates/dock/src/lib.rs index b919f15..2a566b2 100644 --- a/crates/dock/src/lib.rs +++ b/crates/dock/src/lib.rs @@ -9,10 +9,7 @@ //! Everything `gpui_component::dock` exports is re-exported here, so the app //! keeps importing the dock from a single place. -use gpui::{ - App, Div, InteractiveElement as _, MouseButton, Pixels, Stateful, - StatefulInteractiveElement as _, Window, WindowControlArea, px, -}; +use gpui::{Pixels, px}; mod dock_area; mod invalid_panel; @@ -44,54 +41,3 @@ pub(crate) fn t(key: &'static str) -> &'static str { _ => key, } } - -/// State used to move the window when the title bar area is dragged. -struct WindowDragState { - should_move: bool, -} - -/// Make an element behave like a window title bar: dragging it moves the -/// window, and double-clicking zooms the window (or performs the platform's -/// default title-bar double-click action on macOS). -/// -/// Only the bar's non-interactive areas should get this — tabs are draggable -/// (to reorder panels) and must not move the window. -pub fn title_bar_drag_handlers( - this: Stateful