From be51cac3d71d5eb49e266d0d2aae6ab945caf560 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Tue, 14 Sep 2021 09:10:37 -0700 Subject: Add Align::Fill variant --- native/src/layout/node.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'native/src/layout/node.rs') 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; + } } } -- cgit