Commit 9a248913 authored by Nikolai Kosjar's avatar Nikolai Kosjar

TextEditor: Fine tune painting of the light bulb

* Paint it a bit bigger
* Center vertically in line

Change-Id: I5ba751e9b1e21591965bbf7a9ce020ee7b2b9c66
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent bab23031
......@@ -77,12 +77,13 @@ void RefactorOverlay::paintMarker(const RefactorMarker& marker, QPainter *painte
if (icon.isNull())
icon = m_icon;
const QSize proposedIconSize = QSize(m_editor->fontMetrics().width(QLatin1Char(' ')) + 2,
const QSize proposedIconSize = QSize(m_editor->fontMetrics().width(QLatin1Char(' ')) + 3,
cursorRect.height());
const QSize actualIconSize = icon.actualSize(proposedIconSize);
const int y = cursorRect.top() + ((cursorRect.height() - actualIconSize.height()) / 2);
const int x = cursorRect.right();
marker.rect = QRect(x, cursorRect.top(), actualIconSize.width(), actualIconSize.height());
marker.rect = QRect(x, y, actualIconSize.width(), actualIconSize.height());
icon.paint(painter, marker.rect);
m_maxWidth = qMax(m_maxWidth, x + actualIconSize.width() - int(offset.x()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment