Revert "TextEditor: Tweak the refactoroverlay painting for HighDPI"

This reverts commit ddf1072d53.

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 <atw@spyro-soft.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Marcus Tillmanns
2025-01-31 09:17:05 +00:00
parent 6a030109f2
commit 15aa8e6246

View File

@@ -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);