summaryrefslogtreecommitdiffstats
path: root/examples/events.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-30 20:54:04 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-30 21:00:27 +0100
commit2ff0e48142c302cb93130164d083589bb2ac4979 (patch)
tree0abdf5892d999c0e98b42849c74cab8a619fbb5e /examples/events.rs
parent74d01a69577065ce4152fc80b297e8816ab3deff (diff)
downloadiced-2ff0e48142c302cb93130164d083589bb2ac4979.tar.gz
iced-2ff0e48142c302cb93130164d083589bb2ac4979.tar.bz2
iced-2ff0e48142c302cb93130164d083589bb2ac4979.zip
Make `Row`, `Column`, and `Checkbox` shrink by default
Diffstat (limited to 'examples/events.rs')
-rw-r--r--examples/events.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/events.rs b/examples/events.rs
index 7d83fbd8..74542171 100644
--- a/examples/events.rs
+++ b/examples/events.rs
@@ -57,13 +57,9 @@ impl Application for Events {
fn view(&mut self) -> Element<Message> {
let events = self.last.iter().fold(
- Column::new().width(Length::Shrink).spacing(10),
+ Column::new().spacing(10),
|column, event| {
- column.push(
- Text::new(format!("{:?}", event))
- .size(40)
- .width(Length::Shrink),
- )
+ column.push(Text::new(format!("{:?}", event)).size(40))
},
);
@@ -71,11 +67,9 @@ impl Application for Events {
self.enabled,
"Listen to runtime events",
Message::Toggled,
- )
- .width(Length::Shrink);
+ );
let content = Column::new()
- .width(Length::Shrink)
.align_items(Align::Center)
.spacing(20)
.push(events)