Make panels independently resizable

This commit is contained in:
Nathan Sobo 2023-05-11 23:25:05 -06:00
parent 5549669316
commit 214354b4da
8 changed files with 135 additions and 154 deletions

View file

@ -179,6 +179,14 @@ impl Panel for TerminalPanel {
});
}
fn default_size(&self, cx: &gpui::WindowContext) -> f32 {
let settings = &cx.global::<Settings>().terminal_overrides;
match self.position(cx) {
DockPosition::Left | DockPosition::Right => settings.default_width.unwrap_or(640.),
DockPosition::Bottom => settings.default_height.unwrap_or(320.),
}
}
fn icon_path(&self) -> &'static str {
"icons/terminal_12.svg"
}