mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Windows: proper, non blurry, icon displayed. Fixes #3473
This commit is contained in:
parent
1b63cfa6a4
commit
7dd6e8f57d
@ -66,6 +66,7 @@ import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static processing.app.I18n.tr;
|
||||
|
||||
@ -1913,22 +1914,20 @@ public class Base {
|
||||
|
||||
|
||||
/**
|
||||
* Give this Frame a Processing icon.
|
||||
* Give this Frame an icon.
|
||||
*/
|
||||
static public void setIcon(Frame frame) {
|
||||
// don't use the low-res icon on Mac OS X; the window should
|
||||
// already have the right icon from the .app file.
|
||||
if (OSUtils.isMacOS()) return;
|
||||
|
||||
// don't use the low-res icon on Linux
|
||||
if (OSUtils.isLinux()){
|
||||
Image image = Toolkit.getDefaultToolkit().createImage(BaseNoGui.getContentFile("/lib/arduino.png").getAbsolutePath());
|
||||
frame.setIconImage(image);
|
||||
if (OSUtils.isMacOS()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Image image = Toolkit.getDefaultToolkit().createImage(PApplet.ICON_IMAGE);
|
||||
frame.setIconImage(image);
|
||||
List<Image> icons = Stream
|
||||
.of("16", "24", "32", "48", "64", "72", "96", "128", "256")
|
||||
.map(res -> "/lib/icons/" + res + "x" + res + "/apps/arduino.png")
|
||||
.map(path -> BaseNoGui.getContentFile(path).getAbsolutePath())
|
||||
.map(absPath -> Toolkit.getDefaultToolkit().createImage(absPath))
|
||||
.collect(Collectors.toList());
|
||||
frame.setIconImages(icons);
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,25 +65,6 @@ public class PApplet {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GIF image of the Processing logo.
|
||||
*/
|
||||
static public final byte[] ICON_IMAGE = {
|
||||
71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 0, 0, 0, 0, 0,
|
||||
0, 0, -127, 0, -127, 0, 0, -127, -127, -127, 0, 0, -127, 0, -127, -127,
|
||||
-127, 0, -127, -127, -127, -63, -63, -63, 0, 0, -1, 0, -1, 0, 0, -1,
|
||||
-1, -1, 0, 0, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, -7, 4,
|
||||
9, 0, 0, 16, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 5,
|
||||
75, 32, 36, -118, -57, 96, 14, -57, -88, 66, -27, -23, -90, -86, 43, -97,
|
||||
99, 59, -65, -30, 125, -77, 3, -14, -4, 8, -109, 15, -120, -22, 61, 78,
|
||||
15, -124, 15, 25, 28, 28, 93, 63, -45, 115, -22, -116, 90, -83, 82, 89,
|
||||
-44, -103, 61, 44, -91, -54, -89, 19, -111, 50, 18, -51, -55, 1, 73, -121,
|
||||
-53, -79, 77, 43, -101, 12, -74, -30, -99, -24, -94, 16, 0, 59,
|
||||
};
|
||||
|
||||
/**
|
||||
* Split the provided String at wherever whitespace occurs. Multiple
|
||||
* whitespace (extra spaces or tabs or whatever) between items will count as a
|
||||
|
@ -791,6 +791,10 @@
|
||||
<mkdir dir="windows/work" />
|
||||
<mkdir dir="windows/work/${staging_hardware_folder}" />
|
||||
|
||||
<copy todir="windows/work/lib">
|
||||
<fileset dir="shared" includes="icons/**/*.png"/>
|
||||
</copy>
|
||||
|
||||
<!-- assemble the pde -->
|
||||
<mkdir dir="windows/work/lib" />
|
||||
<copy todir="windows/work/lib" flatten="true">
|
||||
|
Loading…
x
Reference in New Issue
Block a user