Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.2
-
None
Description
When using QListView with non-zero viewport margins and IconMode - the translated viewport rectangle is incorrect in a case when right-to-left direction.
For example, execution setViewportMargins(50, 0, 0, 0); should provide left shifting when left-to-right direction. The margin should be from right side when righ-to-left direction. But it not. Is it correct behavior?
The suspicious code in QAbstractScrollAreaPrivate::layoutChildren() :
src/widgets/widgets/qabstractscrollarea.cpp
if (q->isRightToLeft()) viewportRect.adjust(right, top, -left, -bottom); else viewportRect.adjust(left, top, -right, -bottom); viewport->setGeometry(QStyle::visualRect(opt.direction, opt.rect, viewportRect)); // resize the viewport last
There is unnecessary isRightToLeft checking and adjust operation.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-64866 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
221213,1 | QAbstractScrollArea/layouting: do not adjust RTL direction twice | 5.11 | qt/qtbase | Status: ABANDONED | 0 | 0 |