From ddd40d009cfa1a374c88015cdbab03b6d91d0551 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 26 Jul 2004 18:59:00 +0000 Subject: [PATCH] Justify the status label appropriately based on the relative position of the progress bar and the status display. --- .../threerings/getdown/launcher/StatusPanel.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/getdown/launcher/StatusPanel.java b/src/java/com/threerings/getdown/launcher/StatusPanel.java index e31c86e..146ce81 100644 --- a/src/java/com/threerings/getdown/launcher/StatusPanel.java +++ b/src/java/com/threerings/getdown/launcher/StatusPanel.java @@ -1,5 +1,5 @@ // -// $Id: StatusPanel.java,v 1.9 2004/07/26 18:31:39 mdb Exp $ +// $Id: StatusPanel.java,v 1.10 2004/07/26 18:59:00 mdb Exp $ package com.threerings.getdown.launcher; @@ -136,7 +136,16 @@ public class StatusPanel extends JComponent } if (_label != null) { - _label.render(gfx, _spos.x, _spos.y); + // if the status region is higher than the progress region, we + // want to align the label with the bottom of its region + // rather than the top + int ly; + if (_spos.y > _ppos.y) { + ly = _spos.y; + } else { + ly = _spos.y + (_spos.height - _label.getSize().height); + } + _label.render(gfx, _spos.x, ly); } SwingUtil.restoreAntiAliasing(gfx, oalias);