Fix Fusion style combobox dirty lines in HiDPI mode.

Tuned combobox item highlight outline to avoid
dirty lines when painting in HiDPI mode.

Task-number: QTBUG-45600
Change-Id: I3c4aab91b2d32733bd2561424052034a3d9c26a3
Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
bb10
Marko Kangas 2015-04-15 16:29:54 +03:00
parent 4ca7785161
commit b7022d782a
1 changed files with 1 additions and 7 deletions

View File

@ -1536,13 +1536,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
QRect r = option->rect;
painter->fillRect(r, highlight);
painter->setPen(QPen(highlightOutline));
const QLine lines[4] = {
QLine(QPoint(r.left() + 1, r.bottom()), QPoint(r.right() - 1, r.bottom())),
QLine(QPoint(r.left() + 1, r.top()), QPoint(r.right() - 1, r.top())),
QLine(QPoint(r.left(), r.top()), QPoint(r.left(), r.bottom())),
QLine(QPoint(r.right() , r.top()), QPoint(r.right(), r.bottom())),
};
painter->drawLines(lines, 4);
painter->drawRect(QRectF(r).adjusted(0.5, 0.5, -0.5, -0.5));
}
bool checkable = menuItem->checkType != QStyleOptionMenuItem::NotCheckable;
bool checked = menuItem->checked;