From 3d5f400b9dcadeffe6a46adf1d5ba3e53aa64a73 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 8 Aug 2026 09:56:58 +0300 Subject: [PATCH] fix(statusbar): keep the cursor visible over a disabled menu row A greyed-out option in a status-bar menu made the mouse pointer vanish. A disabled button reports no mouse interaction at all, and a menu is an overlay: when the overlay reports none, the cursor is decided by whatever lies beneath it, which over the drawing is the canvas hiding the pointer so it can draw the crosshair itself. Enabled rows were fine only because they ask for a pointer and so never fall through. Every row now answers for the cursor over it, doing something or not. `mouse_area` fills in only where the content stays silent, so an enabled row keeps the pointer it asked for. Fixed for every status-bar menu rather than the one that showed it: they all build their rows through the same place, and the next menu with a disabled row would have had the same hole. Closes #684 Co-Authored-By: Claude Opus 5 --- src/ui/statusbar/status_menu.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ui/statusbar/status_menu.rs b/src/ui/statusbar/status_menu.rs index a46b07ee9..4155737cd 100644 --- a/src/ui/statusbar/status_menu.rs +++ b/src/ui/statusbar/status_menu.rs @@ -38,7 +38,19 @@ pub fn menu_bar<'a>( ) -> Element<'a, Message> { let items = entries .into_iter() - .map(|entry| Item::new(entry.content).close_on_click(entry.close_on_click)) + .map(|entry| { + // Every row answers for the cursor over it, even one that does + // nothing. A disabled button reports no interaction at all, and the + // menu is an overlay: when the overlay reports none, the cursor is + // decided by what lies beneath, which over the drawing is the + // canvas hiding it for the crosshair. Hovering a greyed-out option + // therefore made the pointer vanish. `mouse_area` only fills in + // where the content stays silent, so an enabled row keeps its own + // pointer. (#684) + let content = iced::widget::mouse_area(entry.content) + .interaction(iced::mouse::Interaction::Idle); + Item::new(content).close_on_click(entry.close_on_click) + }) .collect(); let menu = Menu::new(items) .width(Length::Fixed(width))