summaryrefslogtreecommitdiff
path: root/src/layout/stack.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/stack.rs')
-rw-r--r--src/layout/stack.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/stack.rs b/src/layout/stack.rs
index d31012f0..211c8a7e 100644
--- a/src/layout/stack.rs
+++ b/src/layout/stack.rs
@@ -178,14 +178,14 @@ impl<'a> StackLayouter<'a> {
self.constraints.exact.x = Some(self.full.w);
self.full.w
} else {
- self.constraints.min.x = Some(used.w);
+ self.constraints.min.x = Some(used.w.min(self.full.w));
used.w
},
if expand.y {
self.constraints.exact.y = Some(self.full.h);
self.full.h
} else {
- self.constraints.min.y = Some(used.h);
+ self.constraints.min.y = Some(used.h.min(self.full.h));
used.h
},
);