-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 dimensions to tooltip when hovering over image files #15543
Feature: Added dimensions to tooltip when hovering over image files #15543
Conversation
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.
The condition of dimensions display availability can be improved, but it works fine.
Co-authored-by: hishitetsu <[email protected]>
Co-authored-by: hishitetsu <[email protected]>
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
Works fine on my end. |
src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs
Outdated
Show resolved
Hide resolved
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 noticed that it's not returning values for webp files, it would be nice to resolve this but it's not a blocker. |
@@ -326,6 +329,41 @@ public ObservableCollection<FileProperty> ItemProperties | |||
set => SetProperty(ref itemProperties, value); | |||
} | |||
|
|||
public string DimensionsDisplay |
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.
I discovered this is fetching as soon as the location is opened, it should only be fetched when hovered for the first time.
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.
This also causes #15202
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.
I'll be commenting this out because the feature is low priority, but it'll be nice to add back once these issues are resolved.
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.
@hishitetsu The first implementer said this way is the fastest however speaking of this should we use WinRT API to retrieve the dimentions of images?
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.
I think the tooltip value can be empty at first, since the tooltip value is updated each time the pointer is entered.
Files/src/Files.App/Views/Layouts/GridLayoutPage.xaml.cs
Lines 675 to 680 in 0923cf0
private void Grid_PointerEntered(object sender, PointerRoutedEventArgs e) | |
{ | |
if (sender is FrameworkElement element && element.DataContext is ListedItem item) | |
// Reassign values to update date display | |
ToolTipService.SetToolTip(element, item.ItemTooltipText); | |
} |
@hishitetsu The first implementer said this way is the fastest however speaking of this should we use WinRT API to retrieve the dimentions of images?
I don't know if using the WinRT API will solve any problems.
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build
. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.