mirror of
https://github.com/danbulant/cushy
synced 2026-07-07 20:20:46 +00:00
Actually fixing the Resize layout fill bug
This commit is contained in:
parent
e4b8a73943
commit
e34d06ac13
1 changed files with 5 additions and 6 deletions
|
|
@ -117,6 +117,10 @@ impl WrapperWidget for Resize {
|
||||||
|| matches!(available_space.height, ConstraintLimit::SizeToFit(_)),
|
|| matches!(available_space.height, ConstraintLimit::SizeToFit(_)),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
let size = Size::new(
|
||||||
|
self.width.clamp(size.width, context.gfx.scale()),
|
||||||
|
self.height.clamp(size.height, context.gfx.scale()),
|
||||||
|
);
|
||||||
if fill_layout {
|
if fill_layout {
|
||||||
// Now that we have our known dimension, give the child an opportunity
|
// Now that we have our known dimension, give the child an opportunity
|
||||||
// to lay out with Fill semantics.
|
// to lay out with Fill semantics.
|
||||||
|
|
@ -125,12 +129,7 @@ impl WrapperWidget for Resize {
|
||||||
.layout(size.map(ConstraintLimit::Fill));
|
.layout(size.map(ConstraintLimit::Fill));
|
||||||
}
|
}
|
||||||
|
|
||||||
Size::new(
|
size.into_signed().into()
|
||||||
self.width.clamp(size.width, context.gfx.scale()),
|
|
||||||
self.height.clamp(size.height, context.gfx.scale()),
|
|
||||||
)
|
|
||||||
.into_signed()
|
|
||||||
.into()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue