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:
fdebbbb
)
JAL-2728 use right denominator for min/max ratio calculations
bug/JAL-2728splitFrameDivision
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 15 Sep 2017 14:03:34 +0000
(15:03 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 15 Sep 2017 14:03:34 +0000
(15:03 +0100)
src/jalview/gui/SplitFrame.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/SplitFrame.java
b/src/jalview/gui/SplitFrame.java
index
d28bb14
..
c23ed7c
100644
(file)
--- a/
src/jalview/gui/SplitFrame.java
+++ b/
src/jalview/gui/SplitFrame.java
@@
-228,19
+228,19
@@
public class SplitFrame extends GSplitFrame implements SplitContainerI
* two sequences visible in the top panel
*/
int topPanelHeight = topFrame.getHeight();
* two sequences visible in the top panel
*/
int topPanelHeight = topFrame.getHeight();
+ int bottomPanelHeight = bottomFrame.getHeight();
int topSequencesHeight = topFrame.alignPanel.getSeqPanel().seqCanvas
.getHeight();
int topPanelMinHeight = topPanelHeight
- Math.max(0,
topSequencesHeight - 2 * topViewport.getCharHeight());
int topSequencesHeight = topFrame.alignPanel.getSeqPanel().seqCanvas
.getHeight();
int topPanelMinHeight = topPanelHeight
- Math.max(0,
topSequencesHeight - 2 * topViewport.getCharHeight());
- int myHeight = getHeight();
- double minRatio = topPanelMinHeight / (double) myHeight;
+ double totalHeight = (double) topPanelHeight + bottomPanelHeight;
+ double minRatio = topPanelMinHeight / totalHeight;
/*
* calculate the maximum ratio that leaves at least
* two sequences visible in the bottom panel
*/
/*
* calculate the maximum ratio that leaves at least
* two sequences visible in the bottom panel
*/
- int bottomPanelHeight = bottomFrame.getHeight();
int bottomSequencesHeight = bottomFrame.alignPanel.getSeqPanel().seqCanvas
.getHeight();
int bottomPanelMinHeight = bottomPanelHeight
int bottomSequencesHeight = bottomFrame.alignPanel.getSeqPanel().seqCanvas
.getHeight();
int bottomPanelMinHeight = bottomPanelHeight
@@
-248,7
+248,7
@@
public class SplitFrame extends GSplitFrame implements SplitContainerI
0,
bottomSequencesHeight - 2
* bottomViewport.getCharHeight());
0,
bottomSequencesHeight - 2
* bottomViewport.getCharHeight());
- double maxRatio = (myHeight - bottomPanelMinHeight) / (double) myHeight;
+ double maxRatio = (totalHeight - bottomPanelMinHeight) / totalHeight;
/*
* estimate ratio of (topFrameContent / bottomFrameContent)
/*
* estimate ratio of (topFrameContent / bottomFrameContent)