fix: opaque menu for overlay

This commit is contained in:
Ashley Wulber 2026-06-08 16:49:09 -04:00 committed by Ashley Wulber
parent f04437cee5
commit f5fc392ba4
3 changed files with 21 additions and 7 deletions

View file

@ -715,7 +715,21 @@ where
// draw path highlight
if self.path_highlight.is_some() {
let styling = theme.appearance(&self.style);
let mut is_overlay = true;
#[cfg(all(
feature = "multi-window",
feature = "wayland",
target_os = "linux",
feature = "winit",
feature = "surface-message"
))]
if matches!(WINDOWING_SYSTEM.get(), Some(WindowingSystem::Wayland))
&& self.on_surface_action.is_some()
&& self.window_id != window::Id::NONE
{
is_overlay = true;
};
let styling = theme.appearance(&self.style, is_overlay);
if let Some(active) = state.active_root.first() {
let active_bounds = layout
.children()

View file

@ -742,7 +742,7 @@ impl<'b, Message: Clone + 'static> Menu<'b, Message> {
Rectangle::new(Point::ORIGIN, Size::INFINITE)
};
let styling = theme.appearance(&self.style);
let styling = theme.appearance(&self.style, self.is_overlay);
let roots = active_root.iter().skip(1).fold(
&self.menu_roots[active_root[0]].children,
|mt, next_active_root| &mt[*next_active_root].children,