summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-05-06 09:16:24 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-06 09:16:24 +0200
commitbc62013b6cde52174bf4c4286939cf170bfa7760 (patch)
treed83cf94e45dcead75008e3e216ef497c6b4dda0d /native
parentc8952ee4a1118fe67bfdf40fc77f3ff30f5d0278 (diff)
parent00700a4742102d77a1d05cf8c49463be49c0b76c (diff)
downloadiced-bc62013b6cde52174bf4c4286939cf170bfa7760.tar.gz
iced-bc62013b6cde52174bf4c4286939cf170bfa7760.tar.bz2
iced-bc62013b6cde52174bf4c4286939cf170bfa7760.zip
Merge pull request #1831 from iced-rs/fix/menu-selected-option-bounds
Fix `bounds` of selected option background in `Menu`
Diffstat (limited to '')
-rw-r--r--native/src/overlay/menu.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs
index 50f741ef..d93a3b56 100644
--- a/native/src/overlay/menu.rs
+++ b/native/src/overlay/menu.rs
@@ -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(),