summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-03-05 15:37:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-15 05:06:15 +0200
commita4463311a997b3a7e68ccab2fd1d05c07396725e (patch)
tree6d68577c3fb2218e3e4f53d4713ef9b680d729a5 /src/widgets
parent1caa0c023f4fa60446094e53f22ee79771130e2f (diff)
Don't draw size grip on Mac > 10.6
After Apple added the resize functionality to window borders, they stopped rendering the size grip in most apps. Hence we do not need to either. Since the status bar height depends on the status bar being there, we considered the safest option to keep it but make it hidden. Change-Id: Ida06e8f0de0f50d746a7d25bc5a472e22a370645 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index e56a1d6e7e..3131d5d048 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -840,7 +840,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
: kThemeGrowRight | kThemeGrowDown;
gbi.size = sz == QAquaSizeSmall ? kHIThemeGrowBoxSizeSmall : kHIThemeGrowBoxSizeNormal;
if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr)
- ret = QSize(r.size.width, r.size.height);
+ ret = QSize(QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6 ? r.size.width : 0, r.size.height);
}
break;
case QStyle::CT_ComboBox:
@@ -4316,6 +4316,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
case CE_ProgressBarGroove:
break;
case CE_SizeGrip: {
+ // We do not draw size grips on versions > 10.6
+ if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6)
+ break;
+
if (w && w->testAttribute(Qt::WA_MacOpaqueSizeGrip)) {
HIThemeGrowBoxDrawInfo gdi;
gdi.version = qt_mac_hitheme_version;