diff options
author | Marko Kangas <marko.kangas@digia.com> | 2015-03-09 10:14:18 +0200 |
---|---|---|
committer | Marko Kangas <marko.kangas@theqtcompany.com> | 2015-03-12 13:20:32 +0000 |
commit | 044160556c7b4874f03352a56cd289c0ffcd9939 (patch) | |
tree | 7f21f473701847fdf34f1cf25c7b30a7d1f38f12 /src | |
parent | f85b6c246172c1d8998b592612fcaae43878a5c0 (diff) |
Remove scrollarea cornerarea when only one scrollbar is visible.
Changed cornerarea to be visible only if both scrollbars are visible.
Removed unused Q_DEAD_CODE_FROM_QT4_MAC hasMacSizeGrip case.
Task-number: QTBUG-44084
Change-Id: I4f240268902fa42496befd3754133145d28d4ad6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/widgets/qabstractscrollarea.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp index 41fd418459..2e1caedde7 100644 --- a/src/widgets/widgets/qabstractscrollarea.cpp +++ b/src/widgets/widgets/qabstractscrollarea.cpp @@ -444,19 +444,11 @@ void QAbstractScrollAreaPrivate::layoutChildren() const QPoint cornerPoint(controlsRect.bottomRight() + QPoint(1, 1) - cornerOffset); // Some styles paints the corner if both scorllbars are showing and there is - // no corner widget. Also, on the Mac we paint if there is a native - // (transparent) sizegrip in the area where a corner widget would be. - if ((needv && needh && hasCornerWidget == false && hscrollOverlap == 0 && vscrollOverlap == 0) - || ((needv || needh) -#ifdef Q_DEAD_CODE_FROM_QT4_MAC - && hasMacSizeGrip -#endif - ) - ) { + // no corner widget. + if (needv && needh && !hasCornerWidget && hscrollOverlap == 0 && vscrollOverlap == 0) cornerPaintingRect = QStyle::visualRect(opt.direction, opt.rect, QRect(cornerPoint, extSize)); - } else { + else cornerPaintingRect = QRect(); - } #ifdef Q_DEAD_CODE_FROM_QT4_MAC if (hasMacReverseSizeGrip) |