You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- README "How It Works": reflect the refactor. New file list now
includes quicklookcontroller, quicklookcontenthandler, and
quicklookimagehandler. Modified-files list updates DolphinView to
the narrow signal seam, adds DolphinTabPage (owns the per-tab
controller + split-view retarget), and the kcfg entry. Architecture
diagram redrawn around QuickLookController ⇒ overlay ⇒ polymorphic
content handler, with the DolphinView seam split out. Step-by-step
flow rewritten around aboutToActivateItem / consumeActivation /
activeViewChanged instead of the old slotItemActivated surgery.
- README + USAGE: add an Activation Mode section documenting
QuickLookActivation=DoubleClickOnly (the default, bare double-click
opens the preview) vs. PrimeThenDoubleClick (opt-in, Space-priming
required). Scope: ~/.config/dolphinrc under [General]; close keys
are the same in both modes.
Co-Authored-By: claude-flow <ruv@ruv.net>
Copy file name to clipboardExpand all lines: README.md
+43-18Lines changed: 43 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,20 @@ No external apps. No popups. Everything happens inside Dolphin.
100
100
| Right-click while zoomed | Reset zoom to 1x |
101
101
| Up/Down arrows (PDF) | Navigate pages |
102
102
103
+
## Activation Mode
104
+
105
+
The default is **double-click** — tap any supported file twice and the preview opens immediately. Single Space on a selected item is also accepted (as an opt-in "prime then double-click" flow for users who prefer an explicit arm-then-open gesture).
106
+
107
+
Set in `~/.config/dolphinrc` under `[General]`:
108
+
109
+
```ini
110
+
[General]
111
+
QuickLookActivation=DoubleClickOnly # default — double-click opens preview right away
112
+
# QuickLookActivation=PrimeThenDoubleClick # opt-in — double-click only opens preview if Space was pressed first (otherwise normal open)
113
+
```
114
+
115
+
Close keys (`Escape`, `Space`, double-click on the preview) are the same in both modes.
116
+
103
117
## Installation
104
118
105
119
### Quick Install (Recommended)
@@ -201,17 +215,22 @@ The patch adds new files and modifies existing ones in Dolphin's source:
|`src/views/quicklook/quicklookcontroller.h/cpp`| Owns the overlay, the Space-prime timer, and the container eventFilter; reattaches across panes in split view |
|`src/views/quicklook/quicklookpdfhandler.h/cpp`| PDF engine: Qt PDF rendering, page cache, async loading, password support |
207
-
|`src/views/quicklook/quicklookmediahandler.h/cpp`| Media engine: video playback, audio with vinyl/FFT visualization |
208
225
209
226
### Modified Files
210
227
211
228
| File | Change |
212
229
|------|--------|
213
-
|`src/views/dolphinview.h`| Added `QuickLookOverlay` member and forward declaration |
214
-
|`src/views/dolphinview.cpp`| Intercepts double-click on supported files to show overlay instead of opening external app |
230
+
|`src/views/dolphinview.h`| Narrow seam: `aboutToActivateItem` signal, `consumeActivation()` slot, `itemListContainer()` accessor — no `QuickLook` string anywhere in the class |
231
+
|`src/views/dolphinview.cpp`|`slotItemActivated` emits `aboutToActivateItem` before the normal `itemActivated`, honours `consumeActivation()`|
232
+
|`src/dolphintabpage.h/cpp`| Owns `std::unique_ptr<QuickLookController>` per tab; retargets it via `activeViewChanged` so split view just works |
233
+
|`src/settings/dolphin_generalsettings.kcfg`| New `QuickLookActivation` enum (`DoubleClickOnly` default / `PrimeThenDoubleClick` opt-in) |
└── QuickLookMediaHandler <- video / audio (Qt Multimedia)
249
+
250
+
DolphinView <- narrow seam only
251
+
+ Q_SIGNAL aboutToActivateItem(KFileItem) <- intercept point
252
+
+ Q_SLOT consumeActivation() <- controller suppresses the default itemActivated
253
+
+ accessor itemListContainer() <- controller uses it for reparenting + eventFilter
230
254
```
231
255
232
256
When a supported file is double-clicked:
233
257
234
-
1.`DolphinView::slotItemActivated()` checks the MIME type
235
-
2. If supported, `QuickLookOverlay::showPreview()` routes to the right handler (image / PDF / video / audio)
236
-
3. The overlay resizes to fill the container and animates in (250ms cubic ease-out, scale 0.3→1.0)
237
-
4. Content is rendered via QPainter and composited with background, shadow, and rounded corners
238
-
5. The file list remains underneath — just covered by the overlay
239
-
6. Double-click or `Escape` triggers `hidePreview()` which animates back out
258
+
1.`DolphinView::slotItemActivated` emits `aboutToActivateItem(item)`*before* the normal `itemActivated` emit
259
+
2.`QuickLookController::onAboutToActivateItem` checks the MIME type and activation mode (`DoubleClickOnly` always allows; `PrimeThenDoubleClick` requires a prior Space-press to arm the prime timer)
260
+
3. If allowed, the controller reparents and resizes the overlay to the active pane's container, calls `QuickLookOverlay::showPreview(url)`, and on success calls `view->consumeActivation()` so the normal `itemActivated` emit is suppressed
261
+
4.`QuickLookOverlay` routes through `QuickLookContentHandler *` to the right backend (image / PDF / video / audio) and animates in (250ms cubic ease-out, scale 0.3→1.0)
262
+
5. Content renders via QPainter over the dark overlay with rounded corners and a dynamic shadow
263
+
6. Double-click, `Escape`, or `Space` triggers `hidePreview()` which animates back out; on finish the overlay emits `previewClosed()` and releases content
264
+
7. Split view: `DolphinTabPage::activeViewChanged` fires whenever the user toggles panes; the controller detaches from the old view, reparents the overlay to the new pane's container, and re-wires its eventFilter — no second overlay needed
|`DoubleClickOnly` (**default**) | Double-click opens the preview immediately |`QuickLookActivation=DoubleClickOnly`|
41
+
|`PrimeThenDoubleClick` (opt-in) | Select the file, tap `Space` to arm, then double-click — a bare double-click opens the file normally |`QuickLookActivation=PrimeThenDoubleClick`|
42
+
43
+
Put the line under `[General]`. The prime timer auto-expires after a couple of seconds, so the armed state doesn't linger if you change your mind.
44
+
36
45
## Closing a Preview
37
46
38
47
Any of these will close the preview with a fade-out animation:
0 commit comments