From c54d46db524f1acf7cf4659a9603bbe50518440f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 1 Jul 2015 11:48:04 +0100 Subject: [PATCH] JAL-1799 deduct more space for decorators on Windows --- src/jalview/gui/AlignmentPanel.java | 8 +++++--- src/jalview/util/Platform.java | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 7228e1b..ad7e75c 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -34,6 +34,7 @@ import jalview.math.AlignmentDimension; import jalview.schemes.ResidueProperties; import jalview.structure.StructureSelectionManager; import jalview.util.MessageManager; +import jalview.util.Platform; import java.awt.BorderLayout; import java.awt.Color; @@ -531,12 +532,13 @@ public class AlignmentPanel extends GAlignmentPanel implements /* * Estimate available height in the AlignFrame for alignment + - * annotations. Deduct an estimate of 75 for menu bar, scale panel, + * annotations. Deduct an estimate for title bar, menu bar, scale panel, * hscroll, status bar (as these are not laid out we can't inspect their - * actual heights). Insets gives borders including title bar. + * actual heights). Insets gives frame borders. */ + int stuff = Platform.isAMac() ? 80 : 100; Insets insets = alignFrame.getInsets(); - int availableHeight = alignFrame.getHeight() - 75 - insets.top + int availableHeight = alignFrame.getHeight() - stuff - insets.top - insets.bottom; /* diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index 333aff4..b812feb 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -32,13 +32,13 @@ public class Platform * * @return true if we do things in a special way. */ - public boolean isAMac() + public static boolean isAMac() { return java.lang.System.getProperty("os.name").indexOf("Mac") > -1; } - public boolean isHeadless() + public static boolean isHeadless() { String hdls = java.lang.System.getProperty("java.awt.headless"); -- 1.7.10.2