Prevent panels from getting so small they can't be resized

This commit is contained in:
Antonio Scandurra 2023-12-22 18:28:28 +01:00
parent 3715ddfa74
commit 961d8331f3

View File

@ -467,6 +467,7 @@ impl Dock {
pub fn resize_active_panel(&mut self, size: Option<Pixels>, cx: &mut ViewContext<Self>) {
if let Some(entry) = self.panel_entries.get_mut(self.active_panel_index) {
let size = size.map(|size| size.max(RESIZE_HANDLE_SIZE));
entry.panel.set_size(size, cx);
cx.notify();
}