diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-03-24 10:10:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-03 11:07:07 +0200 |
commit | d6202762c135fbf5f1242911cf2455ff687f328e (patch) | |
tree | d1935c1d76338ec9c317d30332d1dc6ecbb8e972 /src/widgets/styles/qmacstyle_mac.mm | |
parent | b11adb825c4dfc8429695947cef8f9e3253ad0c2 (diff) |
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>
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac.mm')
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 55e808e9ba..08221ce83a 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -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); } |