summaryrefslogtreecommitdiffstats
path: root/widget/src/svg.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-16 20:23:25 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-04 06:51:21 +0100
commit0655a20ad119e2e9790afcc45039fd4ac0e7d432 (patch)
tree0ce316e386e5b47b6ca80fe16f0a384ef05ff4e8 /widget/src/svg.rs
parent68c0484b5cf6f572e4cb0bf72c22c1a93dbb654e (diff)
downloadiced-0655a20ad119e2e9790afcc45039fd4ac0e7d432.tar.gz
iced-0655a20ad119e2e9790afcc45039fd4ac0e7d432.tar.bz2
iced-0655a20ad119e2e9790afcc45039fd4ac0e7d432.zip
Make `Shrink` have priority over `Fill` in layout
Diffstat (limited to '')
-rw-r--r--widget/src/svg.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/widget/src/svg.rs b/widget/src/svg.rs
index 2d01d1ab..8367ad18 100644
--- a/widget/src/svg.rs
+++ b/widget/src/svg.rs
@@ -115,10 +115,7 @@ where
let image_size = Size::new(width as f32, height as f32);
// The size to be available to the widget prior to `Shrink`ing
- let raw_size = limits
- .width(self.width)
- .height(self.height)
- .resolve(image_size);
+ let raw_size = limits.resolve(image_size, self.width, self.height);
// The uncropped size of the image when fit to the bounds above
let full_size = self.content_fit.fit(image_size, raw_size);