From 8ae4ffbb0ce11a732c8b7a884b75a3c3850b9fd9 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 20 Aug 2025 11:36:42 +0800 Subject: [PATCH] dropdown: Fix dropdown menu width align to input width. (#1159) This caused by the `bounds` of `canvas` prepaint callback now is not including the border widths. ## Before image ## After image --- crates/ui/src/dropdown.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/dropdown.rs b/crates/ui/src/dropdown.rs index a8346caf..fbcd5276 100644 --- a/crates/ui/src/dropdown.rs +++ b/crates/ui/src/dropdown.rs @@ -968,7 +968,7 @@ where div() .occlude() .map(|this| match self.menu_width { - Length::Auto => this.w(bounds.size.width), + Length::Auto => this.w(bounds.size.width + px(2.)), Length::Definite(w) => this.w(w), }) .child(