forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user