Merge branch 'alpha/JAL-3362_Jalview_212_alpha' into alpha/merge_212_JalviewJS_2112
[jalview.git] / src / jalview / gui / SplitFrame.java
index 574cf04..81f0134 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.gui;
 
+import jalview.api.AlignViewportI;
 import jalview.api.AlignViewControllerGuiI;
 import jalview.api.FeatureSettingsControllerI;
 import jalview.api.SplitContainerI;
@@ -117,9 +118,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
      * estimate width and height of SplitFrame; this.getInsets() doesn't seem to
      * give the full additional size (a few pixels short)
      */
-    int widthFudge = Platform.isAMac() ? MAC_INSETS_WIDTH
+    int widthFudge = Platform.isAMacAndNotJS() ? MAC_INSETS_WIDTH
             : WINDOWS_INSETS_WIDTH;
-    int heightFudge = Platform.isAMac() ? MAC_INSETS_HEIGHT
+    int heightFudge = Platform.isAMacAndNotJS() ? MAC_INSETS_HEIGHT
             : WINDOWS_INSETS_HEIGHT;
     int width = ((AlignFrame) getTopFrame()).getWidth() + widthFudge;
     int height = ((AlignFrame) getTopFrame()).getHeight()
@@ -230,8 +231,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
     topFrame.alignPanel.adjustAnnotationHeight();
     bottomFrame.alignPanel.adjustAnnotationHeight();
 
-    final AlignViewport topViewport = topFrame.viewport;
-    final AlignViewport bottomViewport = bottomFrame.viewport;
+    final AlignViewportI topViewport = topFrame.viewport;
+    final AlignViewportI bottomViewport = bottomFrame.viewport;
     final AlignmentI topAlignment = topViewport.getAlignment();
     final AlignmentI bottomAlignment = bottomViewport.getAlignment();
     boolean topAnnotations = topViewport.isShowAnnotation();
@@ -268,7 +269,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
     /*
      * estimate ratio of (topFrameContent / bottomFrameContent)
      */
-    int insets = Platform.isAMac() ? MAC_INSETS_HEIGHT
+    int insets = Platform.isAMacAndNotJS() ? MAC_INSETS_HEIGHT
             : WINDOWS_INSETS_HEIGHT;
     // allow 3 'rows' for scale, scrollbar, status bar
     int topHeight = insets + (3 + topCount) * topCharHeight
@@ -977,7 +978,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
 
     if (showInternalFrame)
     {
-      if (Platform.isAMac())
+      if (Platform.isAMacAndNotJS())
       {
         Desktop.addInternalFrame(featureSettingsUI,
                 MessageManager.getString(
@@ -1100,4 +1101,4 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
   {
     return featureSettingsUI != null && !featureSettingsUI.isClosed();
   }
-}
\ No newline at end of file
+}