Fix dock resizing

This commit is contained in:
Mikayla 2023-08-16 19:47:54 -07:00
parent 3074455386
commit 2f16147055
No known key found for this signature in database
10 changed files with 170 additions and 52 deletions

View file

@ -362,10 +362,10 @@ impl Panel for TerminalPanel {
}
}
fn set_size(&mut self, size: f32, cx: &mut ViewContext<Self>) {
fn set_size(&mut self, size: Option<f32>, cx: &mut ViewContext<Self>) {
match self.position(cx) {
DockPosition::Left | DockPosition::Right => self.width = Some(size),
DockPosition::Bottom => self.height = Some(size),
DockPosition::Left | DockPosition::Right => self.width = size,
DockPosition::Bottom => self.height = size,
}
self.serialize(cx);
cx.notify();