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>
This commit is contained in:
Jens Bache-Wiig 2013-03-05 15:37:26 +01:00 committed by The Qt Project
parent 1caa0c023f
commit a4463311a9

View File

@ -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;