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:
bba1381
)
JAL-3446 Desktop fix for embedding
author
BobHanson
<hansonr@stolaf.edu>
Sun, 7 Jun 2020 04:00:36 +0000
(23:00 -0500)
committer
BobHanson
<hansonr@stolaf.edu>
Sun, 7 Jun 2020 04:00:36 +0000
(23:00 -0500)
src/jalview/gui/Desktop.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
7115e18
..
4b25ef2
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-906,12
+906,14
@@
public class Desktop extends GDesktop
}
openFrameCount++;
}
openFrameCount++;
-
+
+ boolean isEmbedded = (Platform.getEmbeddedAttribute(frame, "id") != null);
+ boolean hasEmbeddedSize = (Platform.getDimIfEmbedded(frame, -1, -1) != null);
+ // Web page embedding allows us to ignore minimum size
+ ignoreMinSize |= hasEmbeddedSize;
+
if (!ignoreMinSize)
{
if (!ignoreMinSize)
{
- frame.setMinimumSize(
- new Dimension(DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT));
-
// Set default dimension for Alignment Frame window.
// The Alignment Frame window could be added from a number of places,
// hence,
// Set default dimension for Alignment Frame window.
// The Alignment Frame window could be added from a number of places,
// hence,
@@
-920,6
+922,10
@@
public class Desktop extends GDesktop
{
frame.setMinimumSize(new Dimension(ALIGN_FRAME_DEFAULT_MIN_WIDTH,
ALIGN_FRAME_DEFAULT_MIN_HEIGHT));
{
frame.setMinimumSize(new Dimension(ALIGN_FRAME_DEFAULT_MIN_WIDTH,
ALIGN_FRAME_DEFAULT_MIN_HEIGHT));
+ } else {
+ frame.setMinimumSize(
+ new Dimension(DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT));
+
}
}
}
}
@@
-929,7
+935,6
@@
public class Desktop extends GDesktop
frame.setMaximizable(resizable);
frame.setIconifiable(resizable);
frame.setOpaque(Platform.isJS());
frame.setMaximizable(resizable);
frame.setIconifiable(resizable);
frame.setOpaque(Platform.isJS());
- boolean isEmbedded = (Platform.getDimIfEmbedded(frame, -1, -1) != null);
if (!isEmbedded && frame.getX() < 1 && frame.getY() < 1)
{
frame.setLocation(xOffset * openFrameCount,
if (!isEmbedded && frame.getX() < 1 && frame.getY() < 1)
{
frame.setLocation(xOffset * openFrameCount,