Skip to content

Commit 91c7a2d

Browse files
committed
Pretty icon for the Windows 7/8 Taskbar the clean way
1 parent c267ca8 commit 91c7a2d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

app/src/processing/app/Base.java

+12-3
Original file line numberDiff line numberDiff line change
@@ -1865,10 +1865,19 @@ static public File selectFolder(String prompt, File folder, Frame frame) {
18651865
static public void setIcon(Frame frame) {
18661866
// don't use the low-res icon on Mac OS X; the window should
18671867
// already have the right icon from the .app file.
1868-
if (!Base.isLinux()) return;
1868+
if (Base.isMacOS()) return;
18691869

1870-
Image image = Toolkit.getDefaultToolkit().createImage(PApplet.ICON_IMAGE);
1871-
frame.setIconImage(image);
1870+
ArrayList<Image> images = new ArrayList<Image>();
1871+
images.add(createImageFromLib("arduino_16.png"));
1872+
images.add(createImageFromLib("arduino_24.png"));
1873+
images.add(createImageFromLib("arduino_32.png"));
1874+
images.add(createImageFromLib("arduino_48.png"));
1875+
frame.setIconImages(images);
1876+
}
1877+
1878+
static private Image createImageFromLib(String filename)
1879+
{
1880+
return Toolkit.getDefaultToolkit().createImage(new File("lib/" + filename).getAbsolutePath());
18721881
}
18731882

18741883

0 commit comments

Comments
 (0)