Skip to content

[widgets/arrows] Fix viewBox size and naturalSize in SvgItems

Noah Davis requested to merge work/ndavis/fix-arrows-naturalSize into master

The viewBox wasn't right, which made the values reported by naturalSize.width and naturalSize.height extremely small.

If you start an SVG from certain templates in Inkscape and then convert the units to px, the viewBox gets messed up. It won't look messed up in Inkscape because everything will appear scaled correctly, but it's actually roughly 26% of the size it should be. In order to fix this, you need to set the document scale to 1.0 which will cause all of the elements in the SVG to shrink to the size they really were. Then, you need to scale all the elements back up to their original sizes.

Edited by Noah Davis

Merge request reports