Bug 299328 - Hover-feedback for "+" sign to select files is missing
Summary: Hover-feedback for "+" sign to select files is missing
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: icons mode (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: junior-jobs
: 318748 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-03 20:54 UTC by Christoph Feck
Modified: 2014-06-16 10:27 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2012-05-03 20:54:32 UTC
When using the icon mode, I love the green "+" appearing on the files, so that I can select multiple of them without using the keyboard. The problem since the rewrite is that the "+" appears on hover, even if you are not actually over the "+" sign, in other words, the click would open the file, instead of selecting it.

The 4.7 dolphin had an additional hover feedback glow, when the pointer was actually over the "+" sign. I think the "+" should appear faded when hovering the icon, and only appear fully, when you hover the "+" marker, but that's only a suggestion.

Marking as a bug, because I lost my selection several times because of this irritation.
Comment 1 Peter Penz 2012-05-03 21:20:40 UTC
I agree, this should be improved and it is OK marking this as bug. I'm not sure whether I can implement this until 4.9.0, but this kind of things can also be done for 4.9.x...
Comment 2 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:42 UTC
Resetting assignee to default as per bug #305719
Comment 3 Frank Reininghaus 2012-12-18 06:40:33 UTC
*** Bug 311598 has been marked as a duplicate of this bug. ***
Comment 4 Frank Reininghaus 2012-12-19 09:47:25 UTC
*** Bug 311598 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2013-04-23 10:30:37 UTC
*** Bug 318748 has been marked as a duplicate of this bug. ***
Comment 6 Frank Reininghaus 2013-11-15 15:12:59 UTC
The interesting thing is that there is some code to handle this - see the members updatePixmap(), hoverEnterEvent(QGraphicsSceneHoverEvent*), and hoverLeaveEvent(QGraphicsSceneHoverEvent*) of KItemListSelectionToggle.

However, it does not work. One problem is that updatePixmap() does the following:

 if (m_hovered) {
    KIconLoader::global()->iconEffect()->apply(m_pixmap, KIconLoader::Desktop, KIconLoader::ActiveState);
}

But the "apply(...)" call does not modify m_pixmap at all, but it returns a new QPixmap which has the effect applied. But even prepending the command with "m_pixmap = " does not help - it seems that the hover*Event() functions of KItemListSelectionToggle are never called. Unfortunately, I don't quite understand why :-(
Comment 7 Emmanuel Pescosta 2014-02-24 17:28:07 UTC
Review-Request: https://git.reviewboard.kde.org/r/116028/
Comment 8 Emmanuel Pescosta 2014-03-03 21:08:41 UTC
Git commit 24326d447358f0dbfc18963743207d4a3d4f1c9e by Emmanuel Pescosta.
Committed on 03/03/2014 at 21:06.
Pushed by emmanuelp into branch 'KDE/4.13'.

Add a hover effect for the selection toggle.

FIXED-IN: 4.13.0
REVIEW: 116028

M  +5    -0    dolphin/src/kitemviews/kitemlistcontroller.cpp
M  +7    -0    dolphin/src/kitemviews/kitemlistwidget.cpp
M  +2    -0    dolphin/src/kitemviews/kitemlistwidget.h
M  +12   -21   dolphin/src/kitemviews/private/kitemlistselectiontoggle.cpp
M  +2    -2    dolphin/src/kitemviews/private/kitemlistselectiontoggle.h

http://commits.kde.org/kde-baseapps/24326d447358f0dbfc18963743207d4a3d4f1c9e
Comment 9 Richard Llom 2014-05-03 13:04:31 UTC
Hello Emmanuel,
how exactly is your patch supposed to work?

I noticed +/- signs are now in grey when hovering over the file/folder icon, however there is no additional effect (they stay grey) when hovering over the +/- sign. (?)
Comment 10 Wolfgang Bauer 2014-05-11 15:47:52 UTC
(In reply to comment #9)
> I noticed +/- signs are now in grey when hovering over the file/folder icon,
> however there is no additional effect (they stay grey) when hovering over
> the +/- sign. (?)

I can confirm this here (openSUSE 13.1, KDE SC 4.13.0).

The +/- signs are now in disabled state always, there's still no feedback when you hover over them.
I'm reopening this bug report therefore.
Comment 11 Emmanuel Pescosta 2014-05-13 11:39:38 UTC
Oh sorry, something went wrong before I have pushed the patch! Thanks for reopening this report!

It should be "selectionToggleRect().contains(pos)" instead of "m_selectionToggle->contains(pos)" in KItemListWidget::setHoverPosition(const QPointF& pos).
Comment 12 Emmanuel Pescosta 2014-05-29 13:38:30 UTC
Git commit 34a7860714ad6cd1df088536b25d0fd492cc9b38 by Emmanuel Pescosta.
Committed on 25/05/2014 at 16:55.
Pushed by emmanuelp into branch 'KDE/4.13'.

Use "selectionToggleRect().contains(pos)" instead
of "m_selectionToggle->contains(pos)" in
KItemListWidget::setHoverPosition(const QPointF& pos).

This wrong check was accidentally introduced by
commit 24326d447358f0dbfc18963743207d4a3d4f1c9e
REVIEW: 118320
FIXED-IN: 4.13.2

M  +1    -1    dolphin/src/kitemviews/kitemlistwidget.cpp

http://commits.kde.org/kde-baseapps/34a7860714ad6cd1df088536b25d0fd492cc9b38
Comment 13 Wolfgang Bauer 2014-06-16 10:14:48 UTC
This seems to work now in 4.13.2.

Thank you!
Comment 14 Emmanuel Pescosta 2014-06-16 10:27:23 UTC
(In reply to comment #13)
> This seems to work now in 4.13.2.
> 
> Thank you!

Thanks for your feedback! :)

What do you (and others) think about a fade-in/out effect for the selection toggle?
Feel free to discuss it with us in https://git.reviewboard.kde.org/r/118395/ ;)