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:
47f38d0
)
JAL-3032 don't place desktop at negative x or y position
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 26 Jun 2018 07:49:32 +0000
(08:49 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 26 Jun 2018 07:49:32 +0000
(08:49 +0100)
src/jalview/gui/Desktop.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
b4b0cdb
..
bc5db70
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-379,8
+379,9
@@
public class Desktop extends jalview.jbgui.GDesktop
else
{
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- setBounds((screenSize.width - 900) / 2, (screenSize.height - 650) / 2,
- 900, 650);
+ int xPos = Math.max(5, (screenSize.width - 900) / 2);
+ int yPos = Math.max(5, (screenSize.height - 650) / 2);
+ setBounds(xPos, yPos, 900, 650);
}
/**
* BH 2018