┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2014-05-25 18:30:37 +0200
committerEmmanuel Pescosta <[email protected]>2014-05-29 15:33:03 +0200
commit96c34cfe650cef24bcfd6cfa6977c3b0ccb77281 (patch)
tree010f77a2a8614e6caa16ce0ef4446b95bb679789 /src
parentfb69036dbd5478c47d90037f3be6413c4c826b7b (diff)
Fix Bug 334696 - File/directory icons/names move to the right when opening/refreshing contents of Dolphin
Take the scrollbar spacing into account. BUG: 334696 REVIEW: 118319 FIXED-IN: 4.13.2
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kitemlistview.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp
index f1b35fa53..222a29cf5 100644
--- a/src/kitemviews/kitemlistview.cpp
+++ b/src/kitemviews/kitemlistview.cpp
@@ -1048,11 +1048,17 @@ void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges)
(!verticalScrollOrientation && maximumScrollOffset() > size().width());
if (decreaseLayouterSize) {
const int scrollBarExtent = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
+
+ int scrollbarSpacing = 0;
+ if (style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) {
+ scrollbarSpacing = style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing);
+ }
+
QSizeF layouterSize = m_layouter->size();
if (verticalScrollOrientation) {
- layouterSize.rwidth() -= scrollBarExtent;
+ layouterSize.rwidth() -= scrollBarExtent + scrollbarSpacing;
} else {
- layouterSize.rheight() -= scrollBarExtent;
+ layouterSize.rheight() -= scrollBarExtent + scrollbarSpacing;
}
m_layouter->setSize(layouterSize);
}