-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Feature: Added setting to select files and folders on mouse hover #9977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Added setting to select files and folders on mouse hover #9977
Conversation
Left some comments regarding spaces and property names but code looks code. |
f5ded36
to
5ed553f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I did notice some issues where the items weren't selected but let's wait for the update ListView styles from WinUI before making this an issue.
@gave92 do you want to look this over before I merge it? |
Ok, I should be able to go over it later today. |
Sorry @ferrariofilippo I've pushed more changes than I wanted to. I'm gonna revert most of them shortly. Aside from that the functionality works well. Possible improvements:
|
This reverts commit 9dfb8c3.
I think we should fix this before merging |
It's a problem of DetailsLayout too. |
I find out there's a problem when hovering an element's borders: |
This seems to happen pretty often 🤔 |
I read MS (Windows.UI.Xaml.Controls) ListView docs, and I learnt it doesn't support any |
Can this be solved by adding a border control to the ListView item and adding the PointerEntered event on that? I don't think it'll have that big of a performance hit but we should check the difference on a large directory like |
I'll try that |
I found a way of fixing |
I've pushed feee91f to propose a fix for hover on elements "empty space". It should work for all layout modes, with no need to change the xaml. Idea is to subscribe the pointer events on the ListViewItem container. What do you think? |
I think it's great. Thank you for the fix! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
container.PointerPressed += FileListItem_PointerPressed; | ||
if (UserSettingsService.PreferencesSettingsService.SelectFilesOnHover) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that we need to listen when this property changes as well, otherwise the user needs to restart the app for the setting to take effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Refreshing the file list should be enough though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably do the same thing we do when users change the setting to show hidden items.
Resolved / Related Issues
Items resolved / related issues by this PR.
Validation
How did you test these changes?