From 5ed4c97ee50d5cb7f7e8cca05c2acf421163189d Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Fri, 21 Nov 2025 13:02:50 +0100 Subject: [PATCH] Tooltip: fix newline detection --- Modules/Tooltip/Tooltip.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/Tooltip/Tooltip.qml b/Modules/Tooltip/Tooltip.qml index a3185364..7874746d 100644 --- a/Modules/Tooltip/Tooltip.qml +++ b/Modules/Tooltip/Tooltip.qml @@ -122,8 +122,11 @@ PopupWindow { hideImmediately(); } + // Convert \n to
for RichText format + const processedText = tipText.replace(/\n/g, '
'); + // Set properties - text = tipText; + text = processedText; targetItem = target; // Find the correct screen dimensions based on target's global position @@ -326,7 +329,9 @@ PopupWindow { // Update text function function updateText(newText) { if (visible && targetItem) { - text = newText; + // Convert \n to
for RichText format + const processedText = newText.replace(/\n/g, '
'); + text = processedText; // Recalculate dimensions const tipWidth = Math.min(tooltipText.implicitWidth + (padding * 2), maxWidth);