summaryrefslogtreecommitdiffstats
path: root/native/src/layout/node.rs
diff options
context:
space:
mode:
authorLibravatar Cory Forsstrom <cory.forsstrom@lich.io>2021-09-14 09:10:37 -0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-20 15:11:06 +0700
commitbe51cac3d71d5eb49e266d0d2aae6ab945caf560 (patch)
treebb7c53cef31db77ce00f9c0e4729b48b61a2db15 /native/src/layout/node.rs
parent456a3f15e4226cc781a8825bddaaf066476d4351 (diff)
downloadiced-be51cac3d71d5eb49e266d0d2aae6ab945caf560.tar.gz
iced-be51cac3d71d5eb49e266d0d2aae6ab945caf560.tar.bz2
iced-be51cac3d71d5eb49e266d0d2aae6ab945caf560.zip
Add Align::Fill variant
Diffstat (limited to '')
-rw-r--r--native/src/layout/node.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/native/src/layout/node.rs b/native/src/layout/node.rs
index d7666f31..bee5e64e 100644
--- a/native/src/layout/node.rs
+++ b/native/src/layout/node.rs
@@ -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;
+ }
}
}