Changing Tray Icon

7 views
Skip to first unread message

denysonique

unread,
Dec 9, 2013, 7:16:30 AM12/9/13
to node-...@googlegroups.com
How can I dynamically change the tray icon? e.g. to a number icon

Kaiyang Lv

unread,
Dec 23, 2013, 2:29:50 AM12/23/13
to node-...@googlegroups.com
Please check Here
var tray = new gui.Tray({ title: 'Tray', icon: 'img/icon.png' });
tray.remove();
tray = new gui.Tray({ title: 'Tray', icon: 'img/another_icon.png' });

Dennis Próchniak

unread,
Dec 23, 2013, 3:29:22 PM12/23/13
to node-...@googlegroups.com
I am already using this method, but this causes flickering and is not changing the icon. this is replacing the whole tray widget.


--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
-----------------------------------------------
Dennis Próchniak
Message has been deleted

psi...@googlemail.com

unread,
Jan 6, 2014, 4:33:46 AM1/6/14
to node-...@googlegroups.com
var trayIcon = new gui.Tray({
	title: 'Test',
	icon: 'img/tray.png'
});
trayIcon.on('click', function() {
	trayIcon.icon = (trayIcon.icon == 'img/tray.png') ? 'img/tray_on.png' : 'img/tray.png';
});
Reply all
Reply to author
Forward
0 new messages