From e9d50159ee88cb4106724c2bc45d65945ada6488 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 3 Sep 2021 17:56:07 +0200 Subject: [PATCH] Add a min width for the `ChatPanel` Co-Authored-By: Nathan Sobo --- zed/src/chat_panel.rs | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/zed/src/chat_panel.rs b/zed/src/chat_panel.rs index 77c5a7777d..2b5570ca91 100644 --- a/zed/src/chat_panel.rs +++ b/zed/src/chat_panel.rs @@ -313,18 +313,22 @@ impl View for ChatPanel { fn render(&mut self, _: &mut RenderContext) -> ElementBox { let theme = &self.settings.borrow().theme; - Container::new( - Flex::column() - .with_child( - Container::new(ChildView::new(self.channel_select.id()).boxed()) - .with_style(&theme.chat_panel.channel_select.container) - .boxed(), - ) - .with_child(self.render_active_channel_messages()) - .with_child(self.render_input_box()) - .boxed(), + ConstrainedBox::new( + Container::new( + Flex::column() + .with_child( + Container::new(ChildView::new(self.channel_select.id()).boxed()) + .with_style(&theme.chat_panel.channel_select.container) + .boxed(), + ) + .with_child(self.render_active_channel_messages()) + .with_child(self.render_input_box()) + .boxed(), + ) + .with_style(&theme.chat_panel.container) + .boxed(), ) - .with_style(&theme.chat_panel.container) + .with_min_width(150.) .boxed() }