Prevent panels from getting so small they can't be resized
This commit is contained in:
parent
3715ddfa74
commit
961d8331f3
1 changed files with 1 additions and 0 deletions
|
@ -467,6 +467,7 @@ impl Dock {
|
||||||
|
|
||||||
pub fn resize_active_panel(&mut self, size: Option<Pixels>, cx: &mut ViewContext<Self>) {
|
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) {
|
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);
|
entry.panel.set_size(size, cx);
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue