qr_code icon indicating copy to clipboard operation
qr_code copied to clipboard

Adding a `viewbox` attribute to the generated svg.

Open Bastes opened this issue 5 months ago • 1 comments

Hi, I've bumped into a problem integrating the svg into a view: resizing the item made it cut its content instead of scaling it.

To fix it, I added a viewbox, like this:

<svg width="410" height="410" ... viewbox="0 0 410 410">...</svg>

This way the svg resizes with its content scaling.

I don't know why this hasn't already been suggested, but it helps a lot when styling.

I might suggest a PR if you're interested :)

Bastes avatar Aug 07 '25 19:08 Bastes

And here you go with the pull request 🙂

Bastes avatar Aug 08 '25 09:08 Bastes