Mac: Transient scrollbars should overlap in the corner on 10.8

Change-Id: Ied239d5e3cb05bed6b892607f0344e6daa028918
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Gabriel de Dietrich 2012-12-05 16:20:12 +01:00 committed by The Qt Project
parent f3bbf55cbe
commit fb4ad0d1a9

View File

@ -488,13 +488,21 @@ void QAbstractScrollAreaPrivate::layoutChildren()
#ifdef Q_WS_MAC
if (hasMacReverseSizeGrip)
horizontalScrollBarRect.adjust(vsbExt, 0, 0, 0);
#endif
#ifdef Q_OS_MAC
if (!hasCornerWidget && QSysInfo::macVersion() >= QSysInfo::MV_10_8 && q->style()->styleHint(QStyle::SH_ScrollBar_Transient))
horizontalScrollBarRect.adjust(0, 0, cornerOffset.x(), 0);
#endif
scrollBarContainers[Qt::Horizontal]->setGeometry(QStyle::visualRect(opt.direction, opt.rect, horizontalScrollBarRect));
scrollBarContainers[Qt::Horizontal]->raise();
}
if (needv) {
const QRect verticalScrollBarRect (QPoint(cornerPoint.x(), controlsRect.top() + hHeaderBottom), QPoint(controlsRect.right(), cornerPoint.y() - 1));
QRect verticalScrollBarRect (QPoint(cornerPoint.x(), controlsRect.top() + hHeaderBottom), QPoint(controlsRect.right(), cornerPoint.y() - 1));
#ifdef Q_OS_MAC
if (!hasCornerWidget && QSysInfo::macVersion() >= QSysInfo::MV_10_8 && q->style()->styleHint(QStyle::SH_ScrollBar_Transient))
verticalScrollBarRect.adjust(0, 0, 0, cornerOffset.y());
#endif
scrollBarContainers[Qt::Vertical]->setGeometry(QStyle::visualRect(opt.direction, opt.rect, verticalScrollBarRect));
scrollBarContainers[Qt::Vertical]->raise();
}