From f706ed216a30b18f4003eaa7384df31dd63185f3 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 11 Feb 2014 11:32:30 -0800 Subject: [PATCH] Fix our bounds calculation when missing bg image. --- .../java/com/threerings/getdown/launcher/StatusPanel.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/threerings/getdown/launcher/StatusPanel.java b/src/main/java/com/threerings/getdown/launcher/StatusPanel.java index 3bd3e86..8b1f565 100644 --- a/src/main/java/com/threerings/getdown/launcher/StatusPanel.java +++ b/src/main/java/com/threerings/getdown/launcher/StatusPanel.java @@ -65,8 +65,9 @@ public class StatusPanel extends JComponent int height = img == null ? -1 : img.getHeight(this); if (width == -1 || height == -1) { Rectangle bounds = ifc.progress.union(ifc.status); - bounds.grow(5, 5); - _psize = bounds.getSize(); + // assume the x inset defines the frame padding; add it on the left, right, and bottom + _psize = new Dimension(bounds.x + bounds.width + bounds.x, + bounds.y + bounds.height + bounds.x); } else { _psize = new Dimension(width, height); }