Make panels independently resizable
This commit is contained in:
parent
5549669316
commit
214354b4da
8 changed files with 135 additions and 154 deletions
|
@ -1347,12 +1347,9 @@ impl Entity for ProjectPanel {
|
|||
impl workspace::dock::Panel for ProjectPanel {
|
||||
fn position(&self, cx: &gpui::WindowContext) -> DockPosition {
|
||||
let settings = cx.global::<Settings>();
|
||||
let dock = settings
|
||||
.project_panel_overrides
|
||||
.dock
|
||||
.or(settings.project_panel_defaults.dock)
|
||||
.unwrap();
|
||||
match dock {
|
||||
match settings
|
||||
.project_panel
|
||||
.dock {
|
||||
settings::ProjectPanelDockPosition::Left => DockPosition::Left,
|
||||
settings::ProjectPanelDockPosition::Right => DockPosition::Right,
|
||||
}
|
||||
|
@ -1374,6 +1371,10 @@ impl workspace::dock::Panel for ProjectPanel {
|
|||
})
|
||||
}
|
||||
|
||||
fn default_size(&self, cx: &gpui::WindowContext) -> f32 {
|
||||
cx.global::<Settings>().project_panel.default_width
|
||||
}
|
||||
|
||||
fn icon_path(&self) -> &'static str {
|
||||
"icons/folder_tree_16.svg"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue