From fe8ebb2748893e04cb4fa969e9559d01bbeb2ae3 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 22 Nov 2026 08:18:31 +0700 Subject: [PATCH] ui-widgets: the link-in-a-sentence story fits its room at every text size At 379 points in a 400-point room it wrapped under the large text size and came out narrower. With no closing stop its width is the same in both directions. --- crates/ui-widgets/src/buttons/stories.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/ui-widgets/src/buttons/stories.rs b/crates/ui-widgets/src/buttons/stories.rs index 29425c73d..953649b16 100644 --- a/crates/ui-widgets/src/buttons/stories.rs +++ b/crates/ui-widgets/src/buttons/stories.rs @@ -432,13 +432,14 @@ fn button_with_detail(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { Button::new("Quick start").icon(IconId::new("eye")).detail("Learn the basics of drawing in five minutes").show(ui).into() } -/// A link inside a sentence. +/// A link inside a sentence short enough to stay on one line at every text size. It has no closing stop: a neutral +/// end moves under right-to-left and changes the run's width. #[story(Link, covers = [], drive = Drive::Never, title = "In a sentence")] fn link_in_sentence(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { let shown = Row::new().show(ui, |ui, _| { - Text::new("Every shortcut is listed in").show(ui); + Text::new("See").show(ui); Link::new("the shortcuts guide").url("https://example.com/shortcuts").id_salt("guide").show(ui); - Text::new("and can be changed.").show(ui); + Text::new("to change a key").show(ui); }); shown.into() }