summaryrefslogtreecommitdiffstats
path: root/examples/layout/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-02-15 02:57:52 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-15 02:57:52 +0100
commit84cc9f130b4e29219d47db42cdb76548b054c66b (patch)
tree5758716b7ca1a35e589969efd9537f5e56dd1e27 /examples/layout/src
parent5827023ccc3f80012b17dbfe778fbd8b63186c99 (diff)
parent777e2e34f50c440f59d9a407f75be80fbbfaccae (diff)
downloadiced-84cc9f130b4e29219d47db42cdb76548b054c66b.tar.gz
iced-84cc9f130b4e29219d47db42cdb76548b054c66b.tar.bz2
iced-84cc9f130b4e29219d47db42cdb76548b054c66b.zip
Merge pull request #2253 from iced-rs/improve-ergonomics
Improve some widget ergonomics
Diffstat (limited to 'examples/layout/src')
-rw-r--r--examples/layout/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/layout/src/main.rs b/examples/layout/src/main.rs
index f41c9986..06a476be 100644
--- a/examples/layout/src/main.rs
+++ b/examples/layout/src/main.rs
@@ -85,7 +85,7 @@ impl Application for Layout {
fn view(&self) -> Element<Message> {
let header = row![
text(self.example.title).size(20).font(Font::MONOSPACE),
- horizontal_space(Length::Fill),
+ horizontal_space(),
checkbox("Explain", self.explain)
.on_toggle(Message::ExplainToggled),
pick_list(Theme::ALL, Some(&self.theme), Message::ThemeSelected),
@@ -117,7 +117,7 @@ impl Application for Layout {
.on_press(Message::Previous)
.into(),
),
- Some(horizontal_space(Length::Fill).into()),
+ Some(horizontal_space().into()),
(!self.example.is_last()).then_some(
button("Next →")
.padding([5, 10])
@@ -251,16 +251,16 @@ fn row_<'a>() -> Element<'a, Message> {
}
fn space<'a>() -> Element<'a, Message> {
- row!["Left!", horizontal_space(Length::Fill), "Right!"].into()
+ row!["Left!", horizontal_space(), "Right!"].into()
}
fn application<'a>() -> Element<'a, Message> {
let header = container(
row![
square(40),
- horizontal_space(Length::Fill),
+ horizontal_space(),
"Header!",
- horizontal_space(Length::Fill),
+ horizontal_space(),
square(40),
]
.padding(10)