summaryrefslogtreecommitdiffstats
path: root/native/src/layout
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-30 18:37:13 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-30 19:33:27 +0100
commitaecc3ad1955b8433d1634ab1b975d2af20e772a1 (patch)
tree549e1c3b58f60b130117f036cbdf71157d1a7ff1 /native/src/layout
parent4b86c2ff987e334c3454540828c6f8d16d27c670 (diff)
downloadiced-aecc3ad1955b8433d1634ab1b975d2af20e772a1.tar.gz
iced-aecc3ad1955b8433d1634ab1b975d2af20e772a1.tar.bz2
iced-aecc3ad1955b8433d1634ab1b975d2af20e772a1.zip
Add `Length::FillPortion` variant
It allows to specify the amount of available space an element should take relative to other elements.
Diffstat (limited to 'native/src/layout')
-rw-r--r--native/src/layout/limits.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/layout/limits.rs b/native/src/layout/limits.rs
index 2705a47d..a35f7ff7 100644
--- a/native/src/layout/limits.rs
+++ b/native/src/layout/limits.rs
@@ -52,7 +52,7 @@ impl Limits {
Length::Shrink => {
self.fill.width = self.min.width;
}
- Length::Fill => {
+ Length::Fill | Length::FillPortion(_) => {
self.fill.width = self.fill.width.min(self.max.width);
}
Length::Units(units) => {
@@ -76,7 +76,7 @@ impl Limits {
Length::Shrink => {
self.fill.height = self.min.height;
}
- Length::Fill => {
+ Length::Fill | Length::FillPortion(_) => {
self.fill.height = self.fill.height.min(self.max.height);
}
Length::Units(units) => {