diff options
author | David Schulz <[email protected]> | 2025-04-10 13:45:27 +0200 |
---|---|---|
committer | David Schulz <[email protected]> | 2025-04-25 04:18:40 +0000 |
commit | a62460fb1c969c8f825d54cc1695e738bcffdfcd (patch) | |
tree | 134ff0000cb1e7c7067b7a2d1af39bf0a2768fd4 | |
parent | d2d4dcfb56e75b959f29052e78c61b1ff46b663e (diff) |
Editor: fix annotation tooltips for horizontally scrolled editors
Fixes: QTCREATORBUG-32658
Change-Id: I6853617e1b564d25bff1ec40735b5f1d0e79f0ae
Reviewed-by: Eike Ziller <[email protected]>
-rw-r--r-- | src/plugins/texteditor/texteditor.cpp | 2 |
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) { |