Hit Box for widgets

Mark Waddingham mark at livecode.com
Tue Apr 2 13:52:30 EDT 2019


On 2019-04-02 14:52, Sannyasin Brahmanathaswami via use-livecode wrote:
> Yes,  that works, but "It's genius"   I'm not sure.
> 
> Not being able change color, which is available in LC SVG widgets is a
> pain. If your theme is "black" and you want "white" SVG, you don’t
> have control over the color in LC.  You can set color in the svg text
> source. There are two ways, the only one accepted by LC import control
> as image is:
> 
> <path style="fill: #fff" d="m110.488.... />
> 
> But if the eye candy people on the team say "Oh, could you make it
> *just* a bit darker."
> 
> You are forced to change it in SVG text source, reimport the images
> and deal with new ID's for the icons of buttons.

You can just do what the 'Import Control...' feature does when given an
SVG file from the message box (or even in a script in your stack you can
run when updating the SVG files):

   set the text of image ... to drawingSvgCompileFile(<svg file path>)

We're adding support for 'currentColor' in SVG fill/stroke attributes
in the next non-maintenance version - this will allow you to do:

   <path style="fill: currentColor" ... />

Then you will be able to set the backColor of the image object you
import the SVG into to change the color of the fill or stroke attributes
referencing it.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list