widget icon glow

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
rjd
Posts: 16
Joined: Thu Aug 29, 2013 11:29 am

widget icon glow

Post by rjd » Sat Mar 24, 2018 4:58 pm

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 :(

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: widget icon glow

Post by richmond62 » Sat Mar 24, 2018 6:07 pm

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 133 times

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: widget icon glow

Post by bogs » Sat Mar 24, 2018 7:50 pm

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.
Image

Klaus
Posts: 13822
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: widget icon glow

Post by Klaus » Sat Mar 24, 2018 8:05 pm

Group the single SVG and apply the desired effects to that group!
Noone will tell the difference! :D

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: widget icon glow

Post by richmond62 » Sat Mar 24, 2018 8:37 pm

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.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: widget icon glow

Post by bogs » Sat Mar 24, 2018 10:18 pm

On second thought, what Klaus said! (or what I said, which doesn't require ungrouping :D )
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”