aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schulz <[email protected]>2025-04-10 13:45:27 +0200
committerDavid Schulz <[email protected]>2025-04-25 04:18:40 +0000
commita62460fb1c969c8f825d54cc1695e738bcffdfcd (patch)
tree134ff0000cb1e7c7067b7a2d1af39bf0a2768fd4
parentd2d4dcfb56e75b959f29052e78c61b1ff46b663e (diff)
Editor: fix annotation tooltips for horizontally scrolled editors
-rw-r--r--src/plugins/texteditor/texteditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index fc562fc7a79..97d15a5df14 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -4969,7 +4969,7 @@ bool TextEditorWidget::viewportEvent(QEvent *event)
// Only handle tool tip for text cursor if mouse is within the block for the text cursor,
// and not if the mouse is e.g. in the empty space behind a short line.
if (line.isValid()) {
- const QRectF blockGeometry = blockBoundingGeometry(block);
+ const QRectF blockGeometry = blockBoundingGeometry(block).translated(contentOffset());
const int width = block == d->m_suggestionBlock ? blockGeometry.width()
: line.naturalTextRect().right();
if (pos.x() <= blockGeometry.left() + width) {