New trayicon image (thanks, dr|z3d).

This commit is contained in:
mathiasdm
2011-01-22 14:28:53 +00:00
parent 587dd3041a
commit cf1cf9e738
2 changed files with 2 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -62,6 +62,7 @@ public abstract class TrayManager {
if(SystemTray.isSupported()) { if(SystemTray.isSupported()) {
tray = SystemTray.getSystemTray(); tray = SystemTray.getSystemTray();
trayIcon = new TrayIcon(getTrayImage(), "I2P", getMainMenu()); trayIcon = new TrayIcon(getTrayImage(), "I2P", getMainMenu());
trayIcon.setImageAutoSize(true); //Resize image to fit the system tray
try { try {
tray.add(trayIcon); tray.add(trayIcon);
} catch (AWTException e) { } catch (AWTException e) {
@ -85,7 +86,7 @@ public abstract class TrayManager {
* @return image used for the tray icon * @return image used for the tray icon
*/ */
private Image getTrayImage() { private Image getTrayImage() {
URL url = getClass().getResource("/desktopgui/resources/images/logo.jpg"); URL url = getClass().getResource("/desktopgui/resources/images/logo.png");
Image image = Toolkit.getDefaultToolkit().getImage(url); Image image = Toolkit.getDefaultToolkit().getImage(url);
return image; return image;
} }