Skip to content

Commit

Permalink
fix list intrinsic width calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
johann2 committed Oct 15, 2024
1 parent 4ed0e70 commit ef34159
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/yakui-widgets/src/widgets/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ impl Widget for ListWidget {
self.props.item_spacing * node.children.len().saturating_sub(1) as f32;

for &child in &node.children {
let child_width = dom.get(child).unwrap().widget.intrinsic_width(node,dom);
let node=dom.get(child).unwrap();
let child_width = node.widget.intrinsic_width(&node,dom);
width += child_width;
}

width+total_item_spacing
} else {
self.default_intrinsic_width(node,dom)
self.default_intrinsic_width(node,dom);
}
}

Expand Down

0 comments on commit ef34159

Please sign in to comment.