Skip to content

Commit

Permalink
stack: Let iced figure out the size
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Sep 12, 2023
1 parent 9de5104 commit 91a82c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shell/element/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 91a82c0

Please sign in to comment.