-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Added/improved layout modes #827
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
Conversation
If anyone's wondering, the TilesBrower is based on the original PhotoAlbum, so it shares a large portion of the backend code. I decided to keep them as seperate controls as the tiles layout is static while the grid layout has quite a few dynamic properties due to the resize functionality. |
@Dylan-Osborne I don't think it is a good idea to duplicate |
@tsvietOK Thanks for picking that up, I didn't know you could do that. I'll have a look and see what I can come up with data templates. @xpoppyx That should be easy enough to do. Currently it's only a once off that you'd need to refresh after resizing the grid, you could also browse to a different directory to achieve the same effect. |
@Dylan-Osborne examples on how to use different data templates you can find here and here |
@tsvietOK I've managed to get everything working using data templates. I've had to use a DataTemplateSelector to choose which layout to use, but I've noticed that it executes the selector at least once for each listed item. This is bad for performance, there's even a warning on it's docs Is there a way to select a data template once off instead of for each listed item? |
@Dylan-Osborne As i understand, |
Removed duplication between grid and tiles layout
@Dylan-Osborne When using dark theme, one icon still black |
@Dylan-Osborne Not necessarily, but you can add ability to translate new strings by adding them into strings-us file: |
@Dylan-Osborne For large icon you can use font icon |
And vertically align center name, type and file size |
@Dylan-Osborne There is a bug. Repro: |
Files/Files.csproj
Outdated
<Content Include="Assets\FilesHome.png" /> | ||
<Content Include="Assets\FolderIcon.svg" /> | ||
<Content Include="Assets\GridViewLarge.png" /> | ||
<Content Include="Assets\GridViewSmall.png" /> |
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.
Are the Segoe UI assets you can use instead of these?
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.
Yes, I've used the FontIcon fonts @tsvietOK suggested, it looks much better in the dark theme.
I'll commit the changes as soon as I've fixed the folder bug.
@Dylan-Osborne I tested out your changes and I really like them, I noticed two UI issues that should probably be resolved before merging the pull request
|
@yaichenbaum Does the tile sizing look a bit better here? I've reduced the width and height of each cell, I don't want to make the height smaller than this as then it won't be able to wrap longer file names to the second line. I've also vertically centered the text details. |
@Dylan-Osborne Does the new Tiles layout support lazy loading of extended properties like file type, icon, and size? We currently have it that way in GenericFileBrowser and PhotoAlbum. |
@Dylan-Osborne That looks amazing 🙂. Is there anything else we are still waiting on for this pull request to be merged @tsvietOK @duke7553? |
@yaichenbaum Wait a bit, as i understand this bug still not fixed |
@tsvietOK I wasn't able to reproduce that bug on my end. |
@duke7553 It uses the same backend as the original PhotoAlbum, so it should support lazy loading. |
While we are working on this, can you rename PhotoView to GridView? |
@yaichenbaum What about |
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.
Very happy to see this change
@Dylan-Osborne Thank you so much for this pull request, this has been merged into master and will roll out with the next release. |
@xpoppyx Can you please open a separate issue for that? |
Added the "Tiles" layout based on File Explorer (Start to #753)

The tiles layout also supports displaying and editing longer file names.
Here's what it looks like:
Also added support for the current grid layout to be resized as well as switching between layout modes by using ctrl+scroll or ctrl + +- (#756 point 4)
Here's an example of switching between modes using the ctrl shortcuts:

When resizing the grid layout using the ctrl shortcuts, icons only refresh their quality/size on a manual refresh. This is just to prevent the performance impacts of reloading the file thumbnails everytime that a user resizes the grid. Thumbnail sizes for the grid view is calculated based on the current grid size to provide a decent quality thumbnail.
One thing that could need improvement would be the layout selection flyout on the bottom right, I've added tiles layout and three general grid sizes (large, medium and small). I had to create icons for the grid sizes, but I'm not quite sure if they fit in, so if anyone wants to redo the icons they are more than welcome to!
