From a4463311a997b3a7e68ccab2fd1d05c07396725e Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig <jens.bache-wiig@digia.com> Date: Tue, 5 Mar 2013 15:37:26 +0100 Subject: [PATCH] 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> --- src/widgets/styles/qmacstyle_mac.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index e56a1d6e7e9..3131d5d048a 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; -- GitLab