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
|
|
@ -67,7 +67,7 @@ impl Sandbox for Tour {
|
|||
);
|
||||
}
|
||||
|
||||
controls = controls.push(Column::new());
|
||||
controls = controls.push(Column::new().width(Length::Fill));
|
||||
|
||||
if steps.can_continue() {
|
||||
controls = controls.push(
|
||||
|
|
@ -401,6 +401,7 @@ impl<'a> Step {
|
|||
))
|
||||
.push(
|
||||
Text::new(&value.to_string())
|
||||
.width(Length::Fill)
|
||||
.horizontal_alignment(HorizontalAlignment::Center),
|
||||
)
|
||||
}
|
||||
|
|
@ -447,6 +448,7 @@ impl<'a> Step {
|
|||
))
|
||||
.push(
|
||||
Text::new(&format!("{} px", spacing))
|
||||
.width(Length::Fill)
|
||||
.horizontal_alignment(HorizontalAlignment::Center),
|
||||
);
|
||||
|
||||
|
|
@ -561,6 +563,7 @@ impl<'a> Step {
|
|||
))
|
||||
.push(
|
||||
Text::new(&format!("Width: {} px", width.to_string()))
|
||||
.width(Length::Fill)
|
||||
.horizontal_alignment(HorizontalAlignment::Center),
|
||||
)
|
||||
}
|
||||
|
|
@ -580,6 +583,7 @@ impl<'a> Step {
|
|||
.push(Column::new().height(Length::Units(4096)))
|
||||
.push(
|
||||
Text::new("You are halfway there!")
|
||||
.width(Length::Fill)
|
||||
.size(30)
|
||||
.horizontal_alignment(HorizontalAlignment::Center),
|
||||
)
|
||||
|
|
@ -587,6 +591,7 @@ impl<'a> Step {
|
|||
.push(ferris(300))
|
||||
.push(
|
||||
Text::new("You made it!")
|
||||
.width(Length::Fill)
|
||||
.size(50)
|
||||
.horizontal_alignment(HorizontalAlignment::Center),
|
||||
)
|
||||
|
|
@ -629,6 +634,7 @@ impl<'a> Step {
|
|||
} else {
|
||||
value
|
||||
})
|
||||
.width(Length::Fill)
|
||||
.horizontal_alignment(HorizontalAlignment::Center),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue