Skip to content

Fix file thumbnail cropping and rounded thumbnail corners #5717

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

Merged
merged 5 commits into from
Aug 8, 2021
Merged

Conversation

winston-de
Copy link
Contributor

@winston-de winston-de commented Aug 8, 2021

Resolved / Related Issues
Items resolved / related issues by this PR.

Details of Changes
Add details of changes here.

  • Switch to single item thumbnail mode and change resize mode
  • Round corners for grid view thumbnails
  • Show proper file preview images in preview pane and grid view
  • Fix issue where file name would sometimes be cut off in tiles view

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

Screenshots (optional)
image

- prevent thumbnail cropping
- show proper file preview image in preview pane and grid view
@yaira2
Copy link
Member

yaira2 commented Aug 8, 2021

@winston-de can you resolve the merge conflict?

@yaira2 yaira2 self-requested a review August 8, 2021 02:26
@yaira2
Copy link
Member

yaira2 commented Aug 8, 2021

@winston-de should the thumbnails in the details layout have rounded corners as well?

@winston-de
Copy link
Contributor Author

I'm a bit conflicted about that, it almost feels like too much rounding even with just 1px.
image

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 changed the title Fix file thumbnail cropping and round thumbnail corners Fix file thumbnail cropping and rounded thumbnail corners Aug 8, 2021
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Aug 8, 2021
@yaira2 yaira2 merged commit 251adc9 into main Aug 8, 2021
@yaira2 yaira2 deleted the gv_style branch August 8, 2021 02:56
using var Thumbnail = await matchingStorageFile.GetThumbnailAsync(ThumbnailMode.ListView, thumbnailSize, ThumbnailOptions.ResizeThumbnail);
var mode = thumbnailSize < 80 ? ThumbnailMode.ListView : ThumbnailMode.SingleItem;

using var Thumbnail = await matchingStorageFile.GetThumbnailAsync(mode, thumbnailSize, ThumbnailOptions.UseCurrentScale);
Copy link
Member

@gave92 gave92 Aug 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be done also on line 805 (when loading a folder thumbnail)?
It could solve #5723

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gave92 I also wonder whether my addition of ThumbnailOptions.ReturnOnlyIfCached on that line has something to do with it?

Copy link
Contributor Author

@winston-de winston-de Aug 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oddly, this seems to break thumbnails randomly (windows explorer has the same issue from the looks of it so windows bug)
image

winston-de added a commit that referenced this pull request Aug 9, 2021
@winston-de winston-de mentioned this pull request Aug 9, 2021
2 tasks
MelvinSnijders pushed a commit to MelvinSnijders/Files that referenced this pull request Aug 9, 2021
@yaira2
Copy link
Member

yaira2 commented May 8, 2022

@winston-de does this fix still work?

@gave92
Copy link
Member

gave92 commented May 9, 2022

Opened issue #9129 to keep track of this.

@gave92
Copy link
Member

gave92 commented May 15, 2022

Correction: the breaking change for this was in #7881.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid View should have Rounded Corners Thumbnails of images are cropped into squares
4 participants