Replies: 1 comment
-
You could put the image into a fixed size rectangle of 64x64px and make the image scale inside that Rectangle. That way the image won't get bigger than 64px in either dimension and the grid layout sees a list of fixed sized and square items to lay out, where the modulo should just work. But yes, we should add more layout kinds. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I've in the past tried creating a sort of a media viewer and I attempted to create a grid/media preview layout where every element is a child in a grid.
The issue was that different assets may have different aspect ratios or even different sizes needed for the name. I have managed to create something like this by using 2 nested horizontal and vertical layouts and manually computing in what row each element should be. This caused really bad performance issues were I assume every element was destroyed and recreated (including all the image data) every time there was a change.
So I was just wondering is there any way to create a sort of a wrap around horizontal layout?
Note: I know that I can do modulo on the index. This only enables a constant child height grid layout.
Thanks for any advice! Would love to get back in to slint!
Beta Was this translation helpful? Give feedback.
All reactions