diff options
| author | Emmanuel Pescosta <[email protected]> | 2013-09-12 13:58:29 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2013-09-12 13:58:29 +0200 |
| commit | 88a7794097a8490e4398abf3e36c22ecbfaea7ab (patch) | |
| tree | d349964bc52be7b7bb4477701241fec59728e25b /src/kitemviews/kitemlistview.cpp | |
| parent | 4416377eae06e70f5f841e94347f2d0b31113524 (diff) | |
Fix Bug 311099 - View the underscore when using Ctrl + PagDown
Take the style option vertical/horizontal margin into account
for the calculation of the new scroll offset.
Thanks to Frank for pointing out two other problems with "Page Up/Down" and providing
a better way to fix these problems. :)
BUG: 311099
FIXED-IN: 4.11.2
REVIEW: 112678
Diffstat (limited to 'src/kitemviews/kitemlistview.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 7f1526151..a66715090 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -504,7 +504,11 @@ void KItemListView::scrollToItem(int index) const qreal headerHeight = m_headerWidget->size().height(); viewGeometry.adjust(0, headerHeight, 0, 0); } - const QRectF currentRect = itemRect(index); + QRectF currentRect = itemRect(index); + + // Fix for Bug 311099 - View the underscore when using Ctrl + PagDown + currentRect.adjust(-m_styleOption.horizontalMargin, -m_styleOption.verticalMargin, + m_styleOption.horizontalMargin, m_styleOption.verticalMargin); if (!viewGeometry.contains(currentRect)) { qreal newOffset = scrollOffset(); |
