From 103bd91da82a66812f9a50d11c4fb9aa9f425028 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Mon, 17 Nov 2025 22:07:10 -0500 Subject: [PATCH] Tooltip: recalculate position when text content changes. --- Modules/Tooltip/Tooltip.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Modules/Tooltip/Tooltip.qml b/Modules/Tooltip/Tooltip.qml index 75dca2943..4be4ee947 100644 --- a/Modules/Tooltip/Tooltip.qml +++ b/Modules/Tooltip/Tooltip.qml @@ -165,8 +165,6 @@ PopupWindow { return; } - console.log(screenWidth, screenHeight); - // Calculate tooltip dimensions const tipWidth = Math.min(tooltipText.implicitWidth + (padding * 2), maxWidth); root.implicitWidth = tipWidth; @@ -345,8 +343,8 @@ PopupWindow { const globalX = targetGlobal.x + anchorX; if (globalX < 0) { anchorX = -targetGlobal.x + margin; - } else if (globalX + tipWidth > root.screen.width) { - anchorX = root.screen.width - targetGlobal.x - tipWidth - margin; + } else if (globalX + tipWidth > screenWidth) { + anchorX = screenWidth - targetGlobal.x - tipWidth - margin; } // Force anchor update