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

<img width="1070" height="967" alt="image"
src="https://github.com/user-attachments/assets/9ad963bb-c2b0-4b21-bbd6-8e961f779d2f"
/>

## After

<img width="1229" height="1097" alt="image"
src="https://github.com/user-attachments/assets/568f71be-932f-4126-b37a-b92aea3bf88a"
/>
This commit is contained in:
Jason Lee 2025-08-20 11:36:42 +08:00 committed by GitHub
parent e29418e9e4
commit 8ae4ffbb0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(