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>bb10
parent
f85b6c2461
commit
044160556c
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue