SVG icons in buttons

Mark Waddingham mark at
Wed Feb 27 18:19:44 EST 2019

You only need to recompile an svg file to a drawing if the file content changes - drawings scale using the rect of the image object, based on the viewBox and preserveAspectRatio attributes on the root node of the original svg file.

If a specific SVG file isn't scaling when compiled to a drawing and resizing the image it's set on, then check what attributes are set on the root 'svg' element.

Warmest Regards,


Sent from my iPhone

> On 27 Feb 2019, at 20:35, hh via use-livecode <use-livecode at> wrote:
> The corresponding versions that use JavaScript (from midth 2017)
> use the full SVG power of a browser and store the SVG as a
> property of the image. And then they convert (very fast) the SVG
> again to the image whenever the image is resized.
> This doesn't need any additional space if you already use a
> browser widget in your stack.
> LC 8/9: "SVG Powered Images" [by Jonathan] uses a browser widget
> LC 6/7/8/9: "SVG2PNG_6789" [by me] uses revBrowser (Mac only)
> The technique to store the SVG to an image property and to
> recompile it when the control resizes could also be used for
> the current LC approach.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list