From ac95fbd89811efe8ff5c5907a2f3698b555c67b4 Mon Sep 17 00:00:00 2001 From: Remco Smits Date: Wed, 3 Jul 2024 18:20:05 +0200 Subject: [PATCH] Clean up debug panel code For now we only support debugger to be positioned on the bottom. --- crates/debugger_ui/src/debugger_panel.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/crates/debugger_ui/src/debugger_panel.rs b/crates/debugger_ui/src/debugger_panel.rs index 78be37d634ffe8..632bc7c7920208 100644 --- a/crates/debugger_ui/src/debugger_panel.rs +++ b/crates/debugger_ui/src/debugger_panel.rs @@ -33,8 +33,6 @@ actions!( pub struct DebugPanel { pub position: DockPosition, - pub zoomed: bool, - pub active: bool, pub focus_handle: FocusHandle, pub size: Pixels, _subscriptions: Vec, @@ -70,9 +68,6 @@ impl DebugPanel { }); Self { - position: DockPosition::Bottom, - zoomed: false, - active: false, focus_handle: cx.focus_handle(), size: px(300.), _subscriptions, @@ -470,18 +465,14 @@ impl Panel for DebugPanel { } fn position(&self, _cx: &WindowContext) -> DockPosition { - self.position + DockPosition::Bottom } - fn position_is_valid(&self, _position: DockPosition) -> bool { - true + fn position_is_valid(&self, position: DockPosition) -> bool { + position == DockPosition::Bottom } - fn set_position(&mut self, position: DockPosition, _cx: &mut ViewContext) { - self.position = position; - // TODO: - // cx.update_global::(f) - } + fn set_position(&mut self, _position: DockPosition, _cx: &mut ViewContext) {} fn size(&self, _cx: &WindowContext) -> Pixels { self.size