From c01a6efe46a1b66b2d90b93198187574516da5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 27 Aug 2026 13:24:47 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(app):=20library=20context=20?= =?UTF-8?q?menu=20opens=20at=20the=20pointer,=20not=20the=20picture=20floo?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The library row menu mounts on the root over the dock, where no picture exists, but went through `menu_floor`'s picture-floor clamp anyway -- a right-click high in the dock got teleported down near the bench. It now sizes its rows against the full viewport and clamps only to window bounds via `menu_at`, standard context-menu behavior; `menu_floor` stays for the clip menu, which legitimately protects the picture behind it. --- crates/app/src/ui/library.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/crates/app/src/ui/library.rs b/crates/app/src/ui/library.rs index ae02ced..e7812f1 100644 --- a/crates/app/src/ui/library.rs +++ b/crates/app/src/ui/library.rs @@ -1,6 +1,5 @@ //! The media library: the left panel's rows and the menu over them. -use crate::ui::stance::menu_floor; use crate::ui::type_scale::Typeset; use crate::ui::widgets::*; use crate::*; @@ -162,14 +161,14 @@ impl Player { ); } } - // Placed by the height it is drawn to, and drawn to what the window has - // room for -- the clip menu's rule, one function for all three. The - // floor clamp and the room the list sizes against are `menu_floor`'s, - // so a menu taller than the footprint scrolls instead of climbing - // back over the picture. - let (at, room) = menu_floor(menu.at, viewport, self.split_px(Split::Bench, viewport)); - let list_h = menu_rows_h(rows.len(), room); - let (x, y) = menu_at(at, viewport, MENU_PAD * 2. + list_h); + // Placed at the pointer, clamped only to the window's own bounds -- + // standard context-menu behavior. Unlike the clip menu, this menu + // mounts on the root over the dock (no picture behind it to protect), + // so it does not go through `menu_floor`'s picture-floor clamp; doing + // so pulled a right-click high in the dock down to the picture floor, + // teleporting the menu away from the pointer that opened it. + let list_h = menu_rows_h(rows.len(), viewport); + let (x, y) = menu_at(menu.at, viewport, MENU_PAD * 2. + list_h); let full: SharedString = path.display().to_string().into(); Some( scrim()