[Folder View] Lower toolbox when an item is hovered
ClosedPublic

Authored by broulik on Mar 6 2017, 10:58 AM.

Details

Summary

Otherwise it might interfere with the item's interaction (e.g. it would overlap the selection button in the top left).

CCBUG: 337060

Test Plan

Video: https://www.youtube.com/watch?v=SPcfGf9BgsI

Only downside is that when the icon overlapping the toolbox is selected and you highlight another one you can see the toolbox lowering/raising itself. I think this is acceptable given how simple this patch is. Otherwise if we were to onl "move it out of the way" we would have to do super complicated mapping of positions and intersecting them etc which I don't think is worth it. Also given that the "toolBox" item is anchors.fill'd and the way the toolbox internally works (a movable button) is just an implementation detail which we shouldn't assume and don't know about in FolderView.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 6 2017, 10:58 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 6 2017, 10:58 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Mar 6 2017, 12:07 PM
This revision is now accepted and ready to land.Mar 6 2017, 12:07 PM
hein accepted this revision.Mar 6 2017, 8:50 PM
rikmills added a subscriber: rikmills.EditedMar 6 2017, 11:41 PM

Applying this:

This seems to work ok when as shown in the video, you have a panel moved to the top of the screen and the toobox not moved, so it is partially underneath that panel, shifting the relative location of the icon.

However, it does not seem to work at all with the default plasma setup for a new user of the panel at the bottom, toolbox square in shape and top left, and the Home and Wastebin icons in their default place.

You are still unable to hover the mouse and move it to click the selection and folder preview buttons. The toolbox raises or activates and blocks you.

You are still unable to hover the mouse and move it to click the selection and folder preview buttons. The toolbox raises or activates and blocks you.

I can't reproduce. Notice how I was able to interact with the controls despite the ToolBox being there.

Of course if you throw your mouse at the corner you will still raise the toolbox but that is somewhat to be expected. In any way it is an improvement over the status quo. It might indeed be beneficial if we place the tool box at the top right corner by default.

No, not throwing my mouse cursor at it at all.

Starting at:

then very very very slowly edging towards the toolbox, it triggers about here:

Are you running plasma-desktop master? There have been many improvements in highlight handling as well as the icon grid layout itself.

Are you running plasma-desktop master? There have been many improvements in highlight handling as well as the icon grid layout itself.

Just updated and re-applied the patch to make sure.

i.e. http://build.neon.kde.org/job/xenial_unstable_plasma_plasma-desktop/280/

(which was tip of master until you pushed some changes 30 mins ago)

with the patch applied on top.

Tested with a new user once the patch was applied to FolderView.qml

In D4956#93270, @broulik wrote:
In any way it is an improvement over the status quo.

No doubt. Just annoying I can't replicate your result.

It might indeed be beneficial if we place the tool box at the top right corner by default.

Well...... I personally am in favour of that change, unless there is particular/reason or objection.

This revision was automatically updated to reflect the committed changes.

@graesslin The issue @rikmills described happens when there's a screen corner configured in KWin. Could this magic window with the glow interfere in hover handling in some way?