diff options
| author | orbiter <mc@yacy.net> | 2014-09-08 00:21:29 +0200 |
|---|---|---|
| committer | orbiter <mc@yacy.net> | 2014-09-08 00:21:29 +0200 |
| commit | 5b5635e187dc33177285ea5c958120b48d38fee5 (patch) | |
| tree | ae968159a4274cffc36caa5f6aafc29c55d1c368 | |
| parent | aa6cdc4ab5978ca1ac813903108e5a8a3d8cbafe (diff) | |
replaced font for boot tray icon with image and added some more images
for further tray icon displays
| -rw-r--r-- | addon/progress_booting.png | bin | 0 -> 3097 bytes | |||
| -rw-r--r-- | addon/progress_peertopeer.png | bin | 0 -> 2194 bytes | |||
| -rw-r--r-- | addon/progress_search.png | bin | 0 -> 2866 bytes | |||
| -rw-r--r-- | addon/progress_shutdown.png | bin | 0 -> 3154 bytes | |||
| -rw-r--r-- | addon/searchicon.png | bin | 0 -> 3057 bytes | |||
| -rw-r--r-- | source/net/yacy/gui/Tray.java | 10 |
6 files changed, 4 insertions, 6 deletions
diff --git a/addon/progress_booting.png b/addon/progress_booting.png Binary files differnew file mode 100644 index 000000000..8ea89b51e --- /dev/null +++ b/addon/progress_booting.png diff --git a/addon/progress_peertopeer.png b/addon/progress_peertopeer.png Binary files differnew file mode 100644 index 000000000..c4de6aa58 --- /dev/null +++ b/addon/progress_peertopeer.png diff --git a/addon/progress_search.png b/addon/progress_search.png Binary files differnew file mode 100644 index 000000000..118c1c327 --- /dev/null +++ b/addon/progress_search.png diff --git a/addon/progress_shutdown.png b/addon/progress_shutdown.png Binary files differnew file mode 100644 index 000000000..79ec9c1bc --- /dev/null +++ b/addon/progress_shutdown.png diff --git a/addon/searchicon.png b/addon/searchicon.png Binary files differnew file mode 100644 index 000000000..e9fde2fd3 --- /dev/null +++ b/addon/searchicon.png diff --git a/source/net/yacy/gui/Tray.java b/source/net/yacy/gui/Tray.java index 8dfefeb38..5d1e5b099 100644 --- a/source/net/yacy/gui/Tray.java +++ b/source/net/yacy/gui/Tray.java @@ -30,7 +30,6 @@ package net.yacy.gui; import java.awt.Image; import java.awt.image.BufferedImage; import java.awt.Color; -import java.awt.Font; import java.awt.Graphics2D; import java.awt.MenuItem; import java.awt.PopupMenu; @@ -77,6 +76,7 @@ public final class Tray { if (SystemTray.isSupported()) { final String iconPath = sb.getAppPath().toString() + "/addon/YaCy_TrayIcon.png".replace("/", File.separator); final String progressPath = sb.getAppPath().toString() + "/addon/progressbar.png".replace("/", File.separator); + final String progressBootingPath = sb.getAppPath().toString() + "/addon/progress_booting.png".replace("/", File.separator); ActionListener al = new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { @@ -84,13 +84,13 @@ public final class Tray { } }; this.trayIcon = ImageIO.read(new File(iconPath)); // 128x128 - Image progress_raw = ImageIO.read(new File(progressPath)); // 280x56 + Image progress_raw = ImageIO.read(new File(progressPath)); // 149x56 + Image progressBooting = ImageIO.read(new File(progressBootingPath)); // 128x28 BufferedImage progress = new BufferedImage(280, 56, BufferedImage.TYPE_INT_ARGB); Graphics2D progressg = progress.createGraphics(); progressg.drawImage(progress_raw, 0, 0, null); progressg.dispose(); this.progressIcons = new BufferedImage[4]; - Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 30); for (int i = 0; i < 4; i++) { this.progressIcons[i] = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB); Graphics2D h = this.progressIcons[i].createGraphics(); @@ -98,9 +98,7 @@ public final class Tray { h.clearRect(0, 0, 128, 128); h.drawImage(this.trayIcon, 0, 0, 128, 128 - progress.getHeight(), null); h.drawImage(progress.getSubimage(i * 7, 0, 128, progress.getHeight() / 2), 0, 128 - progress.getHeight() / 2, null); - h.setColor(Color.WHITE); - h.setFont(font); - h.drawString("booting...", 2, 128 - progress.getHeight() + 24); + h.drawImage(progressBooting, 0, 128 - progress.getHeight(), null); h.dispose(); } final PopupMenu menu = (menuEnabled) ? getPopupMenu() : null; |
