Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a revised version of the dynamic grid i used in fic to display a preview of a folders's images. It takes the available space and tries to fit as many items as possible and if it can fit them all it tries to stretch them out over the available space. So if a folder has only few images, they are as large as possible, and if it has a lot of images it will squeeze as much as possible by checking each MinSize and scaling everything by the largest encountered size.
There are various fixme-s in the code that need addressing, however a general discussion beforehand on how this layout should work takes priority. In the Video you see one of those bugs which in real world use you likely wont encounter, because you would fill it with pretty much same sized widgets, but it would be a hard blocker for me to release.
And right now the code is in main because of heavy development. If this gets accepted and finalised, it goes into the layout folder of course.
dynamicgriddemo-2024-12-31_21.04.37.mp4