Full row highlight implementation
This MR implements full-row selection highlight for the details view, it directly addresses 181438.
The implementation is configurable, it exposes the "Highlight entire row" checkbox in the It was decided to not have a user-facing setting for this in this thread.Dolphin preference | View Modes | Details
and defaults to false.
Note that this MR implements only the visuals and currently does not attempt to handle row selection by clicking/dragging anywhere in the row.
Logically, if highlighting the entire row is enabled, the expectation is that the row itself should be a clickable target.
However, this behaviour conflicts with the existing rubber band behaviour where dragging on the rows initiates a new selection.
That said, I had a look at what macOS Finder was doing, and the behaviour is almost identical to what we already have.
Same as Dolphin:
- Dragging from a non-empty and non-highlighted row gives you an invisible "rubber band" for multiple selection
- Dragging the icon or text label drags the file directly
Different:
- Clicking on a non-empty and non-highlighted row highlights that row
- Dragging from already highlighted rows will drag the file, you can initiate this drag from anywhere in the highlight
As for Windows Explorer, you must start a selection outside the list view, any drag inside the list view drags the row. This doesn't work well for Dolphin because "outside" only exists on the bottom of the list view iff the list doesn't scroll; on Windows there's empty space beyond the rows extending to the right, so you can start your selection from there.
I reckon I can try to implement the macOS behaviour if we think this is what we want.
Although the visual change this MR implements already reduced the visual overhead for me after a few days of use.
Edit: This MR now fully implements macOS Finder's selection behaviour plus Windows Explorer's right click behaviour.
PS: This will be my very first MR to the KDE project so do let me know if there's any issues with me doing something like this