diff options
author | 2019-12-30 20:54:04 +0100 | |
---|---|---|
committer | 2019-12-30 21:00:27 +0100 | |
commit | 2ff0e48142c302cb93130164d083589bb2ac4979 (patch) | |
tree | 0abdf5892d999c0e98b42849c74cab8a619fbb5e /examples/svg.rs | |
parent | 74d01a69577065ce4152fc80b297e8816ab3deff (diff) | |
download | iced-2ff0e48142c302cb93130164d083589bb2ac4979.tar.gz iced-2ff0e48142c302cb93130164d083589bb2ac4979.tar.bz2 iced-2ff0e48142c302cb93130164d083589bb2ac4979.zip |
Make `Row`, `Column`, and `Checkbox` shrink by default
Diffstat (limited to 'examples/svg.rs')
-rw-r--r-- | examples/svg.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/svg.rs b/examples/svg.rs index cdf238f0..1895039d 100644 --- a/examples/svg.rs +++ b/examples/svg.rs @@ -25,13 +25,14 @@ impl Sandbox for Tiger { let content = { use iced::{Column, Svg}; - Column::new() - .width(Length::Shrink) - .padding(20) - .push(Svg::new(format!( + Column::new().padding(20).push( + Svg::new(format!( "{}/examples/resources/tiger.svg", env!("CARGO_MANIFEST_DIR") - ))) + )) + .width(Length::Fill) + .height(Length::Fill), + ) }; #[cfg(not(feature = "svg"))] @@ -39,7 +40,6 @@ impl Sandbox for Tiger { use iced::{HorizontalAlignment, Text}; Text::new("You need to enable the `svg` feature!") - .width(Length::Shrink) .horizontal_alignment(HorizontalAlignment::Center) .size(30) }; |