┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkseli Lahtinen <[email protected]>2026-02-04 16:10:58 +0200
committerAkseli Lahtinen <[email protected]>2026-02-05 10:49:41 +0200
commit17e55c976581aa58b4500e426fb2925a3d45c308 (patch)
tree634966f35150ece7adb0985da8864c10ef82448e /src
parent19c20993766cf924e0e6d3c72f8e14ce3b5bb2dd (diff)
KItemListController: Use entire row for drag and drop if highlightEntireRow is true
Currently when dragging and dropping items in Details view, even if the "Open files and folders" setting is set "By clicking anywhere on the row", drag and drop still behaves differently. Instead, make the drag and drop follow the setting: If clicking anywhere on the row causes actions, so should dropping anywhere on the row. BUG: 515439
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 8723ba4d9..7c9f77a2d 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -1493,7 +1493,8 @@ KItemListWidget *KItemListController::widgetForDropPos(const QPointF &pos) const
const auto widgets = m_view->visibleItemListWidgets();
for (KItemListWidget *widget : widgets) {
const QPointF mappedPos = widget->mapFromItem(m_view, pos);
- if (widget->selectionRectCore().contains(mappedPos)) {
+ const QRectF highlightRect = m_view->highlightEntireRow() ? widget->selectionRectFull() : widget->selectionRectCore();
+ if (highlightRect.contains(mappedPos)) {
return widget;
}
}