From 1a33872476e58375134dd13c92134c0200ae17b7 Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Sat, 8 Nov 2025 22:33:25 +0100 Subject: feat(rich example): use single paragraph, centered text --- examples/rich/src/main.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'examples/rich') 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), -- cgit v1.2.3