Merge pull request #1831 from iced-rs/fix/menu-selected-option-bounds

Fix `bounds` of selected option background in `Menu`
This commit is contained in:
Héctor Ramón 2023-05-06 09:16:24 +02:00 committed by GitHub
commit bc62013b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -473,7 +473,11 @@ where
if is_selected {
renderer.fill_quad(
renderer::Quad {
bounds,
bounds: Rectangle {
x: bounds.x + appearance.border_width,
width: bounds.width - appearance.border_width * 2.0,
..bounds
},
border_color: Color::TRANSPARENT,
border_width: 0.0,
border_radius: appearance.border_radius.into(),