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:
c775190
)
JAL-2110 set reasonable bounds to initial split of SplitFrame divider
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 1 Jul 2016 14:01:00 +0000
(15:01 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 1 Jul 2016 14:01:00 +0000
(15:01 +0100)
src/jalview/gui/SplitFrame.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/SplitFrame.java
b/src/jalview/gui/SplitFrame.java
index
617224f
..
3b96be8
100644
(file)
--- a/
src/jalview/gui/SplitFrame.java
+++ b/
src/jalview/gui/SplitFrame.java
@@
-206,6
+206,7
@@
public class SplitFrame extends GSplitFrame implements SplitContainerI
final AlignmentI bottomAlignment = bottomViewport.getAlignment();
boolean topAnnotations = topViewport.isShowAnnotation();
boolean bottomAnnotations = bottomViewport.isShowAnnotation();
final AlignmentI bottomAlignment = bottomViewport.getAlignment();
boolean topAnnotations = topViewport.isShowAnnotation();
boolean bottomAnnotations = bottomViewport.isShowAnnotation();
+ // TODO need number of visible sequences here, not #sequences - how?
int topCount = topAlignment.getHeight();
int bottomCount = bottomAlignment.getHeight();
int topCharHeight = topViewport.getViewStyle().getCharHeight();
int topCount = topAlignment.getHeight();
int bottomCount = bottomAlignment.getHeight();
int topCharHeight = topViewport.getViewStyle().getCharHeight();
@@
-223,6
+224,11
@@
public class SplitFrame extends GSplitFrame implements SplitContainerI
+ (bottomAnnotations ? bottomViewport.calcPanelHeight() : 0);
double ratio = ((double) topHeight) / (topHeight + bottomHeight);
+ (bottomAnnotations ? bottomViewport.calcPanelHeight() : 0);
double ratio = ((double) topHeight) / (topHeight + bottomHeight);
+ /*
+ * limit to 0.2 <= ratio <= 0.8 to avoid concealing all sequences
+ */
+ ratio = Math.min(ratio, 0.8d);
+ ratio = Math.max(ratio, 0.2d);
setRelativeDividerLocation(ratio);
}
setRelativeDividerLocation(ratio);
}