summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2012-12-05 16:20:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-06 16:45:52 +0100
commitfb4ad0d1a9d86f0125726683ebecc507cf7eb987 (patch)
treea680f459a3d93f46d3701c1f1b4e2f018287e0f3 /src
parentf3bbf55cbe189f51de7ef343687d110062a2f7e8 (diff)
Mac: Transient scrollbars should overlap in the corner on 10.8
Change-Id: Ied239d5e3cb05bed6b892607f0344e6daa028918 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 3c21d767be..2a3bdb0a59 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -489,12 +489,20 @@ void QAbstractScrollAreaPrivate::layoutChildren()
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();
}