Page 1 of 1

widget icon glow

Posted: Sat Mar 24, 2018 4:58 pm
by rjd
Hi - Is there a way to make a SVG icon glow on mouseEnter without creating custom icons? The outerglow property doesn't seem to apply here :(

Re: widget icon glow

Posted: Sat Mar 24, 2018 6:07 pm
by richmond62
This is because an SVG widget doesn't have these properties:

drop shadow
inner shadow
outer glow
inner glow
color overlay

which imported images do.

Personally I would go for changing the hilite of the widget:

Code: Select all

on mouseEnter
   set the hilite of me to true
   set the hiliteColor of me to red
end mouseEnter

on mouseLeave
   set the hilite of me to false
end mouseLeave
glow.png
Glow SVG.livecode.zip
Here's the stack.
(2.68 KiB) Downloaded 198 times

Re: widget icon glow

Posted: Sat Mar 24, 2018 7:50 pm
by bogs
Another (admittedly kludgey) way you could do it would be to set the svg shape on a matching graphic shape, which does have those properties. Then you could make "creative" use of the graphic's properties and blendlevel to simulate glowing or whatever.

Re: widget icon glow

Posted: Sat Mar 24, 2018 8:05 pm
by Klaus
Group the single SVG and apply the desired effects to that group!
Noone will tell the difference! :D

Re: widget icon glow

Posted: Sat Mar 24, 2018 8:37 pm
by richmond62
Group the single SVG
That's a clever idea :D

Remember, if you want to rotate the widget,
you must be careful to ungroup it, then rotate it, then regroup it.

Re: widget icon glow

Posted: Sat Mar 24, 2018 10:18 pm
by bogs
On second thought, what Klaus said! (or what I said, which doesn't require ungrouping :D )