diff options
-rw-r--r-- | src/plugins/texteditor/refactoroverlay.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/texteditor/refactoroverlay.cpp b/src/plugins/texteditor/refactoroverlay.cpp index cc7fd3cebf..dbce375598 100644 --- a/src/plugins/texteditor/refactoroverlay.cpp +++ b/src/plugins/texteditor/refactoroverlay.cpp @@ -81,9 +81,10 @@ void RefactorOverlay::paintMarker(const RefactorMarker& marker, QPainter *painte if (icon.isNull()) icon = m_icon; + const qreal devicePixelRatio = painter->device()->devicePixelRatio(); const QSize proposedIconSize = QSize(m_editor->fontMetrics().width(QLatin1Char(' ')) + 3, - cursorRect.height()); - const QSize actualIconSize = icon.actualSize(proposedIconSize); + cursorRect.height()) * devicePixelRatio; + const QSize actualIconSize = icon.actualSize(proposedIconSize) / devicePixelRatio; const int y = cursorRect.top() + ((cursorRect.height() - actualIconSize.height()) / 2); const int x = cursorRect.right(); |