Skip to content

Commit

Permalink
Clean up debug panel code
Browse files Browse the repository at this point in the history
For now we only support debugger to be positioned on the bottom.
  • Loading branch information
RemcoSmitsDev committed Jul 3, 2024
1 parent f4eacca commit ac95fbd
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions crates/debugger_ui/src/debugger_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Subscription>,
Expand Down Expand Up @@ -70,9 +68,6 @@ impl DebugPanel {
});

Self {
position: DockPosition::Bottom,
zoomed: false,
active: false,
focus_handle: cx.focus_handle(),
size: px(300.),
_subscriptions,
Expand Down Expand Up @@ -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>) {
self.position = position;
// TODO:
// cx.update_global::<SettingsStore>(f)
}
fn set_position(&mut self, _position: DockPosition, _cx: &mut ViewContext<Self>) {}

fn size(&self, _cx: &WindowContext) -> Pixels {
self.size
Expand Down

0 comments on commit ac95fbd

Please sign in to comment.