Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ec1db8c

Browse files
author
Federico Fissore
committed
New splashscreen and about images
1 parent f7eb248 commit ec1db8c

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

‎app/src/processing/app/Base.java‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,29 +1516,30 @@ protected void loadHardware(File folder) {
15161516
*/
15171517
@SuppressWarnings("serial")
15181518
public void handleAbout() {
1519-
final Image image = getLibImage("about.jpg", activeEditor);
1519+
final Image image = getLibImage("about.png", activeEditor);
15201520
final Window window = new Window(activeEditor) {
1521-
public void paint(Graphics g) {
1522-
g.drawImage(image, 0, 0, null);
1521+
public void paint(Graphics g) {
1522+
g.drawImage(image, 0, 0, null);
15231523

1524-
Graphics2D g2 = (Graphics2D) g;
1525-
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
1526-
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
1524+
Graphics2D g2 = (Graphics2D) g;
1525+
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
1526+
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
15271527

1528-
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
1529-
g.setColor(Color.white);
1530-
g.drawString(BaseNoGui.VERSION_NAME, 50, 30);
1531-
}
1532-
};
1528+
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
1529+
g.setColor(Color.white);
1530+
g.drawString(BaseNoGui.VERSION_NAME, 33, 20);
1531+
}
1532+
};
15331533
window.addMouseListener(new MouseAdapter() {
1534-
public void mousePressed(MouseEvent e) {
1535-
window.dispose();
1536-
}
1537-
});
1534+
public void mousePressed(MouseEvent e) {
1535+
window.dispose();
1536+
}
1537+
});
15381538
int w = image.getWidth(activeEditor);
15391539
int h = image.getHeight(activeEditor);
15401540
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
1541-
window.setBounds((screen.width-w)/2, (screen.height-h)/2, w, h);
1541+
window.setBounds((screen.width - w) / 2, (screen.height - h) / 2, w, h);
1542+
window.setLocationRelativeTo(activeEditor);
15421543
window.setVisible(true);
15431544
}
15441545

@@ -2173,11 +2174,10 @@ static public Image getThemeImage(String name, Component who) {
21732174
* Return an Image object from inside the Processing lib folder.
21742175
*/
21752176
static public Image getLibImage(String name, Component who) {
2176-
Image image = null;
21772177
Toolkit tk = Toolkit.getDefaultToolkit();
21782178

21792179
File imageLocation = new File(getContentFile("lib"), name);
2180-
image = tk.getImage(imageLocation.getAbsolutePath());
2180+
Imageimage = tk.getImage(imageLocation.getAbsolutePath());
21812181
MediaTracker tracker = new MediaTracker(who);
21822182
tracker.addImage(image, 0);
21832183
try {

‎build/build.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,11 +853,11 @@
853853

854854
<copy todir="windows/work">
855855
<fileset dir="windows/launcher"
856-
includes="about.bmp, application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/>
856+
includes="application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/>
857857
</copy>
858858
<launch4j configFile="windows/work/config.xml" />
859859
<launch4j configFile="windows/work/config_debug.xml" />
860-
<delete dir="windows/work" includes="about.bmp, application.ico, config.xml, config_debug.xml" />
860+
<delete dir="windows/work" includes="application.ico, config.xml, config_debug.xml" />
861861
<copy file="windows/work/arduino.l4j.ini" tofile="windows/work/arduino_debug.l4j.ini" />
862862

863863
<!-- cygwin requires html, dll, and exe to have the +x flag -->

‎build/shared/lib/about.jpg‎

-104 KB
Binary file not shown.

‎build/shared/lib/about.png‎

26.1 KB
Loading[フレーム]

‎build/shared/lib/splash.png‎

-95.8 KB
Loading[フレーム]

‎build/windows/launcher/about.bmp‎

-457 KB
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /