git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
68ecfc0
)
JAL-3594 Defintely want SplashScreen to appear in the Desktop window otherwise it...
author
Ben Soares
<b.soares@dundee.ac.uk>
Fri, 11 Dec 2020 20:27:19 +0000
(20:27 +0000)
committer
Ben Soares
<b.soares@dundee.ac.uk>
Fri, 11 Dec 2020 20:27:19 +0000
(20:27 +0000)
src/jalview/gui/SplashScreen.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/SplashScreen.java
b/src/jalview/gui/SplashScreen.java
index
2d5e63b
..
97de08a
100755
(executable)
--- a/
src/jalview/gui/SplashScreen.java
+++ b/
src/jalview/gui/SplashScreen.java
@@
-275,8
+275,10
@@
public class SplashScreen extends JPanel
revalidate();
int width = Math.max(splashText.getWidth(), iconimg.getWidth());
int height = splashText.getHeight() + iconimg.getHeight();
revalidate();
int width = Math.max(splashText.getWidth(), iconimg.getWidth());
int height = splashText.getHeight() + iconimg.getHeight();
- iframe.setBounds((Desktop.instance.getWidth() - width) / 2,
- (Desktop.instance.getHeight() - height) / 2, width, height);
+ iframe.setBounds(
+ Math.max(0, (Desktop.instance.getWidth() - width) / 2),
+ Math.max(0, (Desktop.instance.getHeight() - height) / 2),
+ width, height);
iframe.validate();
iframe.setVisible(true);
return true;
iframe.validate();
iframe.setVisible(true);
return true;