diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2025-11-08 22:33:25 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2025-11-08 22:33:25 +0100 |
| commit | 1a33872476e58375134dd13c92134c0200ae17b7 (patch) | |
| tree | 94504bf99e5d301c00719b0d4d49e3805efa9a77 | |
| parent | chore: add a changelog (diff) | |
| download | iced_selection-1a33872476e58375134dd13c92134c0200ae17b7.tar.gz | |
feat(rich example): use single paragraph, centered text
| -rw-r--r-- | examples/rich/src/main.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/rich/src/main.rs b/examples/rich/src/main.rs index 095651a..aaf75a6 100644 --- a/examples/rich/src/main.rs +++ b/examples/rich/src/main.rs @@ -45,16 +45,11 @@ impl State { span("Rust") .color(color!(0x2b79a2)) .link("https://rust-lang.org"), - ". It is inspired by ", + ".\nIt is inspired by ", span("Elm") .color(color!(0x2b79a2)) .link("https://elm-lang.org"), - ", a delightful functional language for building web applications." - ] - .on_link_click(Message::LinkClicked) - .on_link_hover(Message::LinkHovered) - .on_hover_lost(Message::HoverLost), - rich_text![ + ", a delightful functional language for building web applications.\n\n", "As a GUI library, iced helps you build ", span("graphical user interfaces") .color(color!(0x2b79a2)) @@ -65,6 +60,7 @@ impl State { }), " for your Rust applications." ] + .align_x(Center) .on_link_click(Message::LinkClicked) .on_link_hover(Message::LinkHovered) .on_hover_lost(Message::HoverLost), |
