Skip to content
Snippets Groups Projects
Commit ddf1072d authored by Alessandro Portale's avatar Alessandro Portale
Browse files

TextEditor: Tweak the refactoroverlay painting for HighDPI


The lightbulb was slightly scaled up on HighDPI.

Change-Id: Iea00532ebbf93ce185651ec01364efdbd924a067
Reviewed-by: default avatarDavid Schulz <david.schulz@qt.io>
parent 1fd5cd4d
Branches
Tags
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment