Make Shrink have priority over Fill in layout
This commit is contained in:
parent
68c0484b5c
commit
0655a20ad1
46 changed files with 264 additions and 273 deletions
|
|
@ -99,11 +99,11 @@ where
|
|||
_renderer: &Renderer,
|
||||
limits: &layout::Limits,
|
||||
) -> layout::Node {
|
||||
let limits = limits
|
||||
.width(self.width)
|
||||
.height(self.height.unwrap_or(Length::Fixed(Self::DEFAULT_HEIGHT)));
|
||||
|
||||
let size = limits.resolve(Size::ZERO);
|
||||
let size = limits.resolve(
|
||||
Size::ZERO,
|
||||
self.width,
|
||||
self.height.unwrap_or(Length::Fixed(Self::DEFAULT_HEIGHT)),
|
||||
);
|
||||
|
||||
layout::Node::new(size)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue