From 760c0597ebe0fafa93171e87af58ccb2a4b9939b Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Mon, 24 Mar 2025 17:15:46 +0800 Subject: [PATCH] description_list: Fix incorrect align items for horizontal layout (#730) | Before | After | | - | - | | image | image | --- crates/story/examples/description_list.rs | 2 +- crates/ui/src/description_list.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/story/examples/description_list.rs b/crates/story/examples/description_list.rs index b77284d5..2163c34c 100644 --- a/crates/story/examples/description_list.rs +++ b/crates/story/examples/description_list.rs @@ -52,7 +52,7 @@ impl Example { 1, ), ( - "Platform", + "This is a long label for Platform", "macOS, Windows, Linux", 1, ), diff --git a/crates/ui/src/description_list.rs b/crates/ui/src/description_list.rs index 53c0fb12..b299f864 100644 --- a/crates/ui/src/description_list.rs +++ b/crates/ui/src/description_list.rs @@ -289,7 +289,7 @@ impl RenderOnce for DescriptionList { let el = if self.layout.is_vertical() { v_flex() } else { - h_flex().h_full() + div().flex().flex_row().h_full() }; el.flex_1()