Elements are placed on half pixels

Hello.

When copying an element into a group with smart layout, the element is placed on half pixel if its width is an odd number even though pixel fitting is on.
Is there a way to fix this?

Also, what is the logic behind the suggested placement in the groups with elements of different widths? It seems off most of the time.

Hey there!

Thank you for bringing this up! It does seem like one of those cases where the calculation of Smart Layout (to keep the same constrains) would place the element on a half-pixel. We’ve had sometimes this happen to us and is certainly something the thing has in their scope.

Could you share this isolated use-case so we can check it out on our end? We have some other things working on our end (that we think will solve most of these things as well), so we want to give this one a quick checkup and see what we can find!

:pray:

Hey Raul. Thank you for the reply.

Here’s the file that I used to demonstrate the issue. It’s replicating an actual design with rectangles, the behaviour is identical to what I experience in the original file.

Half pixel.sketch (396.0 KB)