diff options
| author | 2024-05-23 13:38:22 +0200 | |
|---|---|---|
| committer | 2024-05-23 13:38:22 +0200 | |
| commit | 663a081bdd507da0b5ca7d4dc30d78a20b4618af (patch) | |
| tree | 89482c8d1e3a03e00b3a8151abbb81e30ae5898c /examples/tour | |
| parent | 468794d918eb06c1dbebb33c32b10017ad335f05 (diff) | |
| parent | d8ba6b0673a33724a177f3a1ba59705527280142 (diff) | |
| download | iced-663a081bdd507da0b5ca7d4dc30d78a20b4618af.tar.gz iced-663a081bdd507da0b5ca7d4dc30d78a20b4618af.tar.bz2 iced-663a081bdd507da0b5ca7d4dc30d78a20b4618af.zip | |
Merge pull request #2338 from derezzedex/feat/text-macro
Introduce `text` macro
Diffstat (limited to 'examples/tour')
| -rw-r--r-- | examples/tour/src/main.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 59107258..f624053c 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -432,7 +432,7 @@ impl<'a> Step {          let spacing_section = column![              slider(0..=80, spacing, StepMessage::SpacingChanged), -            text(format!("{spacing} px")) +            text!("{spacing} px")                  .width(Length::Fill)                  .horizontal_alignment(alignment::Horizontal::Center),          ] @@ -456,7 +456,7 @@ impl<'a> Step {      fn text(size: u16, color: Color) -> Column<'a, StepMessage> {          let size_section = column![              "You can change its size:", -            text(format!("This text is {size} pixels")).size(size), +            text!("This text is {size} pixels").size(size),              slider(10..=70, size, StepMessage::TextSizeChanged),          ]          .padding(20) @@ -471,7 +471,7 @@ impl<'a> Step {          let color_section = column![              "And its color:", -            text(format!("{color:?}")).color(color), +            text!("{color:?}").color(color),              color_sliders,          ]          .padding(20) @@ -543,7 +543,7 @@ impl<'a> Step {              .push(ferris(width, filter_method))              .push(slider(100..=500, width, StepMessage::ImageWidthChanged))              .push( -                text(format!("Width: {width} px")) +                text!("Width: {width} px")                      .width(Length::Fill)                      .horizontal_alignment(alignment::Horizontal::Center),              ) | 
