primitives: Base Icon's node size on icon size, not item size

To avoid artifacts, we need to make sure we try as best as possible to match the rendered geometry to texture size. Any deviation results in the GPU having to do interpolation on the texture which can lead to artifacts like blurriness.

Since we already calculate the expected size we paint at in updatePaintedSize(), we can use that value as size and only need to center the resulting geometry. The shader will then take care of ensuring we don't end up at fractional pixels.

BUG:391315 BUG:518041 BUG:519129 BUG:408215

(cherry picked from commit 3c8de8d1)

Co-authored-by: Arjen Hiemstra ahiemstra@heimr.nl

Merge request reports

Loading