X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4e2f3dcffe2c2388e9d2d63e626ee6d03abce953..cd5d20ff8a4d2c65d130ef45de5f620b0fa4859e:/src/kitemviews/kitemlistview.cpp diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 5f4c54606..72b3fd8fc 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1753,7 +1753,7 @@ bool KItemListView::moveWidget(KItemListWidget* widget,const QPointF& newPos) if (m_itemSize.isEmpty()) { // The items are not aligned in a grid but either as columns or rows. - startMovingAnim = !supportsItemExpanding(); + startMovingAnim = true; } else { // When having a grid the moving-animation should only be started, if it is done within // one row in the vertical scroll-orientation or one column in the horizontal scroll-orientation. @@ -2318,6 +2318,13 @@ int KItemListView::showDropIndicator(const QPointF& pos) const QPointF mappedPos = widget->mapFromItem(this, pos); const QRectF rect = itemRect(widget->index()); if (mappedPos.y() >= 0 && mappedPos.y() <= rect.height()) { + if (m_model->supportsDropping(widget->index())) { + const int gap = qMax(4, m_styleOption.padding); + if (mappedPos.y() >= gap && mappedPos.y() <= rect.height() - gap) { + return -1; + } + } + const bool isAboveItem = (mappedPos.y () < rect.height() / 2); const qreal y = isAboveItem ? rect.top() : rect.bottom();