summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2016-10-18 13:40:44 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2016-10-18 13:56:58 +0000
commitddf1072d53dce57eca9219f8cdd55c22b8d9d142 (patch)
treea03c66d2dfdf47c32c169ffcc3ebe4e5fd369b06
parent1fd5cd4dbcc892c68fa8e3f415293a500d291f93 (diff)
downloadqt-creator-ddf1072d53dce57eca9219f8cdd55c22b8d9d142.tar.gz
TextEditor: Tweak the refactoroverlay painting for HighDPI
The lightbulb was slightly scaled up on HighDPI. Change-Id: Iea00532ebbf93ce185651ec01364efdbd924a067 Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/plugins/texteditor/refactoroverlay.cpp5
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();