From 8ef3008cb8f049cb6488260700bb80944c77bd71 Mon Sep 17 00:00:00 2001 From: spinline Date: Wed, 11 Feb 2026 00:24:42 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20context=20menu=20viewport=20s=C4=B1n?= =?UTF-8?q?=C4=B1r=20kontrol=C3=BC=20-=20alta/sa=C4=9Fa=20ta=C5=9Fma=20d?= =?UTF-8?q?=C3=BCzeltildi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/context_menu.rs | 47 +++++++++++++++---------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/context_menu.rs b/frontend/src/components/context_menu.rs index 36d8ee2..e70b563 100644 --- a/frontend/src/components/context_menu.rs +++ b/frontend/src/components/context_menu.rs @@ -63,24 +63,35 @@ pub fn TorrentContextMenu( { - let (x, y) = position.get(); - view! { -
-
vw { x - menu_width } else { x }; + let final_y = if y + menu_height > vh { y - menu_height } else { y }; + let final_x = final_x.max(0); + let final_y = final_y.max(0); + view! { +
+
// Start