changing trash icon in blockly

715 views
Skip to first unread message

Ray gautam

unread,
Dec 17, 2019, 1:58:16 AM12/17/19
to Blockly
i found people using their own trash icon. i searched a lot , but couldn't get the idea to do so ? any suggestions ? 
In blockly the zoom, and icon is in same svg , does that mean i need svg which have both zoom and trash can ?

Neil Fraser

unread,
Dec 17, 2019, 2:21:13 AM12/17/19
to blo...@googlegroups.com
On Mon, 16 Dec 2019 at 22:58, Ray gautam <rajuga...@gmail.com> wrote:
i found people using their own trash icon. i searched a lot , but couldn't get the idea to do so ? any suggestions ? 
In blockly the zoom, and icon is in same svg , does that mean i need svg which have both zoom and trash can ?

The sprites.svg file in the same directory is not used by Blockly, though it is the source from which the current sprites.png is generated.

Beka Westberg

unread,
Dec 17, 2019, 10:08:34 AM12/17/19
to Blockly
You may also need to change some of the size constants, if you change the size of the icon.

--Beka

feni...@google.com

unread,
Dec 17, 2019, 8:19:38 PM12/17/19
to Blockly
If you have not forked Blockly you can make a copy of the media directory, edit the sprites file there, and set `media` in the configuration struct to point to your new directory.

Rachel

Ray gautam

unread,
Dec 18, 2019, 1:13:11 AM12/18/19
to Blockly
thanks for the help guys, 
Reply all
Reply to author
Forward
0 new messages