From 15aa8e6246e9e1f4a4fc0b63b5174ae4cf8227b5 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Fri, 31 Jan 2025 09:17:05 +0000 Subject: [PATCH] Revert "TextEditor: Tweak the refactoroverlay painting for HighDPI" This reverts commit ddf1072d53dce57eca9219f8cdd55c22b8d9d142. Reason for revert: The code was necessary for Qt 5, and was partially reverted before. Fixes: QTAIASSIST-159 Change-Id: I8cef677f92b15b6bc4a4d3b4d1095c325d1f07a5 Reviewed-by: Artur Twardy Reviewed-by: David Schulz --- src/plugins/texteditor/refactoroverlay.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/texteditor/refactoroverlay.cpp b/src/plugins/texteditor/refactoroverlay.cpp index a0c928858ca..030fd85eccc 100644 --- a/src/plugins/texteditor/refactoroverlay.cpp +++ b/src/plugins/texteditor/refactoroverlay.cpp @@ -71,10 +71,8 @@ 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().horizontalAdvance(QLatin1Char(' ')) + 3, - cursorRect.height()) * devicePixelRatio; + const QSize proposedIconSize + = QSize(m_editor->fontMetrics().horizontalAdvance(QLatin1Char(' ')) + 3, cursorRect.height()); const QSize actualIconSize = icon.actualSize(proposedIconSize); const int y = cursorRect.top() + ((cursorRect.height() - actualIconSize.height()) / 2);