From 91a82c02b335601126eefcda4f2a7fa658ff9412 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 12 Sep 2023 17:48:13 +0200 Subject: [PATCH] stack: Let iced figure out the size --- src/shell/element/stack.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/element/stack.rs b/src/shell/element/stack.rs index ec8c6758..98a680c7 100644 --- a/src/shell/element/stack.rs +++ b/src/shell/element/stack.rs @@ -623,7 +623,7 @@ impl Program for CosmicStackInternal { fn view(&self) -> CosmicElement<'_, Self::Message> { let windows = self.windows.lock().unwrap(); - let Some(width) = self.geometry.lock().unwrap().as_ref().map(|r| r.size.w) else { + if self.geometry.lock().unwrap().is_none() { return iced_widget::row(Vec::new()).into(); }; let active = self.active.load(Ordering::SeqCst); @@ -685,7 +685,7 @@ impl Program for CosmicStackInternal { iced_widget::row(elements) .height(TAB_HEIGHT as u16) - .width(width as u16) + .width(Length::Fill) //width as u16) .apply(iced_widget::container) .center_y() .style(if self.group_focused.load(Ordering::SeqCst) {