diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-10-20 11:28:38 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-10-21 07:36:57 +0200 |
commit | dc267036e31f9193bad76c803ee162df5ec2d40d (patch) | |
tree | 8ecaedcd727557a08f70aa0ed4c8be865910f56a | |
parent | ae5f3df59b37e0ce8aaef27dc1e02f40def340ae (diff) |
OS X: Retina displays and blurry QToolButton
Checkable QToolButton has a special pixmap in the background,
painted with a 'smooth pixmaps' hint. This hint also affects
how an icon on a toolbutton itself is painted later. The difference
can be quite visible on a Retina display, so this patch makes the toolbutton's
image always look the same in checked/unchecked state.
Task-number: QTBUG-35162
Change-Id: I2adc8006371fa10d89d4b77da6b3aa168aa5abc8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 620ba660e0..d909e13f9a 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -6005,8 +6005,10 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex p->fillPath(path, brush); } else if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) { static QPixmap pm(QLatin1String(":/qt-project.org/mac/style/images/leopard-unified-toolbar-on.png")); + p->save(); p->setRenderHint(QPainter::SmoothPixmapTransform); QStyleHelper::drawBorderPixmap(pm, p, tb->rect, 2, 2, 2, 2); + p->restore(); } else { QPen oldPen = p->pen(); p->setPen(QColor(0, 0, 0, 0x3a)); |