Make Row, Column, and Checkbox shrink by default

This commit is contained in:
Héctor Ramón Jiménez 2019-12-30 20:54:04 +01:00
parent 74d01a6957
commit 2ff0e48142
17 changed files with 42 additions and 54 deletions

View file

@ -96,7 +96,6 @@ impl Application for Stopwatch {
seconds % MINUTE,
self.duration.subsec_millis() / 10,
))
.width(Length::Shrink)
.size(40);
let button = |state, label, color: [f32; 3]| {
@ -125,13 +124,11 @@ impl Application for Stopwatch {
.on_press(Message::Reset);
let controls = Row::new()
.width(Length::Shrink)
.spacing(20)
.push(toggle_button)
.push(reset_button);
let content = Column::new()
.width(Length::Shrink)
.align_items(Align::Center)
.spacing(20)
.push(duration)