From 31ebae5b435a9bfaab6fdbe9eb2c86ba8ef00589 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 25 May 2018 13:49:33 +0100 Subject: [PATCH] JAL-2992 simpler heuristic for available height --- src/jalview/gui/AlignmentPanel.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index f5634d2..2c5684a 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -48,7 +48,6 @@ import java.awt.Dimension; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; -import java.awt.Insets; import java.awt.event.AdjustmentEvent; import java.awt.event.AdjustmentListener; import java.awt.event.ComponentAdapter; @@ -556,13 +555,10 @@ public class AlignmentPanel extends GAlignmentPanel implements /* * Estimate available height in the AlignFrame for alignment + * 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 frame borders. + * hscroll, status bar, insets. */ - int stuff = Platform.isAMac() ? 80 : 100; - Insets insets = alignFrame.getInsets(); - int availableHeight = alignFrame.getHeight() - stuff - insets.top - - insets.bottom; + int stuff = Platform.isAMac() ? 120 : 140; + int availableHeight = alignFrame.getHeight() - stuff; /* * If not enough vertical space, maximize annotation height while keeping -- 1.7.10.2