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

@ -766,7 +766,7 @@ impl<T: FollowableItem> FollowableItemHandle for ViewHandle<T> {
#[cfg(test)]
pub(crate) mod test {
use super::{Item, ItemEvent};
use crate::{dock::Panel, ItemId, ItemNavHistory, Pane, Workspace, WorkspaceId};
use crate::{ItemId, ItemNavHistory, Pane, Workspace, WorkspaceId};
use gpui::{
elements::Empty, AnyElement, AppContext, Element, Entity, ModelHandle, Task, View,
ViewContext, ViewHandle, WeakViewHandle,
@ -1059,42 +1059,4 @@ pub(crate) mod test {
Task::Ready(Some(anyhow::Ok(view)))
}
}
impl Panel for TestItem {
fn position(&self, _cx: &gpui::WindowContext) -> crate::dock::DockPosition {
unimplemented!()
}
fn position_is_valid(&self, _position: crate::dock::DockPosition) -> bool {
unimplemented!()
}
fn set_position(
&mut self,
_position: crate::dock::DockPosition,
_cx: &mut ViewContext<Self>,
) {
unimplemented!()
}
fn icon_path(&self) -> &'static str {
unimplemented!()
}
fn icon_tooltip(&self) -> String {
unimplemented!()
}
fn should_change_position_on_event(_: &Self::Event) -> bool {
unimplemented!()
}
fn should_activate_on_event(&self, _: &Self::Event, _: &AppContext) -> bool {
unimplemented!()
}
fn should_close_on_event(&self, _: &Self::Event, _: &AppContext) -> bool {
unimplemented!()
}
}
}