Add Align::Fill variant

This commit is contained in:
Cory Forsstrom 2021-09-14 09:10:37 -07:00 committed by Héctor Ramón Jiménez
parent 456a3f15e4
commit be51cac3d7
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
4 changed files with 59 additions and 13 deletions

View file

@ -56,6 +56,9 @@ impl Node {
Align::End => {
self.bounds.x += space.width - self.bounds.width;
}
Align::Fill => {
self.bounds.width = space.width;
}
}
match vertical_alignment {
@ -66,6 +69,9 @@ impl Node {
Align::End => {
self.bounds.y += space.height - self.bounds.height;
}
Align::Fill => {
self.bounds.height = space.height;
}
}
}