Skip to content

Commit

Permalink
Bottom bar: Remove space reserved for status text when no present. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
asvitkine authored May 26, 2022
1 parent 1ff8bf0 commit d3cb794
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ private JPanel createCenterPanel() {
territoryInfo,
gridBuilder.gridX(1).weightX(1).anchor(GridBagConstraintsAnchor.CENTER).build());

statusMessage.setVisible(false);
statusMessage.setPreferredSize(new Dimension(0, 0));
statusMessage.setBorder(new EtchedBorder(EtchedBorder.RAISED));
centerPanel.add(
Expand Down Expand Up @@ -99,6 +100,7 @@ private JPanel createStepPanel(boolean usingDiceServer) {
}

public void setStatus(final String msg, final Optional<Image> image) {
statusMessage.setVisible(!msg.isEmpty());
statusMessage.setText(msg);

if (!msg.isEmpty() && image.isPresent()) {
Expand Down

0 comments on commit d3cb794

Please sign in to comment.