OS X: Fix QRubberBand drawing on retina displays
Extend the existing rect adjustment to cover the upper/left edges as well. Check for a valid rect before drawing. Task-number: QTBUG-34534 Change-Id: I156abf4fb52924c350ec24fb44eadca86b2d5339 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Steve Mokris <smokris@softpixel.com>
This commit is contained in:
parent
b11adb825c
commit
d6202762c1
@ -4414,7 +4414,9 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
QPen pen(strokeColor);
|
||||
p->setPen(pen);
|
||||
p->setBrush(fillColor);
|
||||
p->drawRect(opt->rect.adjusted(0, 0, -1, -1));
|
||||
QRect adjusted = opt->rect.adjusted(1, 1, -1, -1);
|
||||
if (adjusted.isValid())
|
||||
p->drawRect(adjusted);
|
||||
p->setPen(oldPen);
|
||||
p->setBrush(oldBrush);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user