Make Row, Column, and Checkbox shrink by default
This commit is contained in:
parent
74d01a6957
commit
2ff0e48142
17 changed files with 42 additions and 54 deletions
|
|
@ -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)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue