┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemlistview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-09-25 19:52:33 +0200
committerPeter Penz <[email protected]>2011-09-25 19:55:42 +0200
commitaee65350437770b22b289e2c7ec5a5a4436e39a6 (patch)
tree39e758fd80a19112144417c470862e26d1a33d17 /src/kitemviews/kfileitemlistview.cpp
parent077ec63f58ff1d58ae56654b08e0f8ee6f5ae8e8 (diff)
Provide scrollbar for large items
If an item does not fit into the available width/height a scrollbar should be provided (e.g. typically this represents the horizontal scrollbar in the details-view where the width can be larger than the than the visible width). Currently the interaction with the scrollbar is not implemented but this will be a quite minor task in comparison to this patch.
Diffstat (limited to 'src/kitemviews/kfileitemlistview.cpp')
-rw-r--r--src/kitemviews/kfileitemlistview.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp
index 68bd7bde9..50f28fe5b 100644
--- a/src/kitemviews/kfileitemlistview.cpp
+++ b/src/kitemviews/kfileitemlistview.cpp
@@ -167,7 +167,7 @@ QSizeF KFileItemListView::itemSizeHint(int index) const
return QSize();
}
-QHash<QByteArray, QSizeF> KFileItemListView::visibleRoleSizes() const
+QHash<QByteArray, QSizeF> KFileItemListView::visibleRolesSizes() const
{
QElapsedTimer timer;
timer.start();
@@ -293,7 +293,7 @@ void KFileItemListView::onItemSizeChanged(const QSizeF& current, const QSizeF& p
triggerVisibleIndexRangeUpdate();
}
-void KFileItemListView::onOffsetChanged(qreal current, qreal previous)
+void KFileItemListView::onScrollOffsetChanged(qreal current, qreal previous)
{
Q_UNUSED(current);
Q_UNUSED(previous);
@@ -353,7 +353,6 @@ void KFileItemListView::resizeEvent(QGraphicsSceneResizeEvent* event)
{
KItemListView::resizeEvent(event);
triggerVisibleIndexRangeUpdate();
- markVisibleRolesSizesAsDirty();
}
void KFileItemListView::slotItemsRemoved(const KItemRangeList& itemRanges)
@@ -435,8 +434,6 @@ QSizeF KFileItemListView::visibleRoleSizeHint(int index, const QByteArray& role)
}
if (role == "name") {
- Q_ASSERT(values.contains("expansionLevel"));
-
// Increase the width by the expansion-toggle and the current expansion level
const int expansionLevel = values.value("expansionLevel", 0).toInt();
width += option.margin + expansionLevel * itemSize().height() + KIconLoader::SizeSmall;