summaryrefslogtreecommitdiffstats
path: root/native/src/layout
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2019-12-31 10:35:51 +0100
committerLibravatar GitHub <noreply@github.com>2019-12-31 10:35:51 +0100
commiteb8866007456c7ea9efb5449096b0aa15b66ba9b (patch)
tree68004fd1f6ad89b4fdf2b37888a59ba3933db6dd /native/src/layout
parent74d01a69577065ce4152fc80b297e8816ab3deff (diff)
parentaecc3ad1955b8433d1634ab1b975d2af20e772a1 (diff)
downloadiced-eb8866007456c7ea9efb5449096b0aa15b66ba9b.tar.gz
iced-eb8866007456c7ea9efb5449096b0aa15b66ba9b.tar.bz2
iced-eb8866007456c7ea9efb5449096b0aa15b66ba9b.zip
Merge pull request #137 from hecrj/feature/fill-portion
Add `Length::FillPortion` variant
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) => {