diff options
| author | Florian RICHER <[email protected]> | 2026-05-15 17:29:46 +0200 |
|---|---|---|
| committer | Florian RICHER <[email protected]> | 2026-05-31 10:57:56 +0200 |
| commit | 2a72145eb09276a4576762b74cb976fcd4550e87 (patch) | |
| tree | c7be1a38ab004c12162edff698fceafe3d8e6488 /src/kitemviews | |
| parent | f622de7f00b6585c9a17e3ed208921582babf77e (diff) | |
dolphinview: Unselect navigator when click on background
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 4 | ||||
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 3250e570a..b1927fc71 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -604,6 +604,10 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent *event, const const Qt::MouseButtons buttons = event->buttons(); + if (!m_pressedIndex.has_value()) { + Q_EMIT clickViewBackground(event->button()); + } + if (!onPress(event->pos(), event->modifiers(), buttons)) { startRubberBand(); return false; diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h index 6379acbd8..38a4b6038 100644 --- a/src/kitemviews/kitemlistcontroller.h +++ b/src/kitemviews/kitemlistcontroller.h @@ -223,6 +223,12 @@ Q_SIGNALS: void swipeUp(); /** + * Emitted when the view's background is clicked. + * Used to trigger a user configured action. + */ + void clickViewBackground(Qt::MouseButton button); + + /** * Emitted when the view's background is double-clicked. * Used to trigger an user configured action. */ |
