commit 3a1c978c53c711be0ad84597a527ad445cf5c2c4
Author: Udi Fogiel <[email protected]>
Date:   Mon Jul 6 07:42:57 2026 +0300

    set tooltip paragraph direction according to UI language
    
    fixes #13023
---
 src/frontends/qt/qt_helpers.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp
index f84d2ec5a9..ae9db8ac41 100644
--- a/src/frontends/qt/qt_helpers.cpp
+++ b/src/frontends/qt/qt_helpers.cpp
@@ -793,10 +793,11 @@ QString formatToolTip(QString text, int width)
        td.setTextWidth(px_width);
        double best_width = td.idealWidth();
        // Set the line wrapping with appropriate width
-       return QString("<html><body><table><tr>"
-                      "<td align=justify width=%1>%2</td>"
+       bool const rtl = qApp->layoutDirection() == Qt::RightToLeft;
+       return QString("<html><body><table dir=%1><tr>"
+                      "<td align=justify width=%2>%3</td>"
                       "</tr></table></body></html>")
-               .arg(QString::number(int(best_width) + 1), text);
+               .arg(rtl ? "rtl" : "ltr", QString::number(int(best_width) + 1), 
text);
 }
 
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to