Skip to content

Commit

Permalink
Bug Fix: Stockpile target column sometimes truncate editable numbers
Browse files Browse the repository at this point in the history
Merge Master
  • Loading branch information
GoldenGnu committed Apr 26, 2024
2 parents 3b0cb1f + 18e5322 commit 71ab464
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public Component prepareRenderer(final TableCellRenderer renderer, final int row
JLabel jLabel = (JLabel) component;
jLabel.setIcon(Images.EDIT_EDIT_BACKGROUND.getIcon());
jLabel.setHorizontalTextPosition(JLabel.TRAILING);
int columnWidth = getColumnModel().getColumn(column).getWidth();
int jLabelWidth = jLabel.getMaximumSize().width + 1;
int columnWidth = getColumnModel().getColumn(column).getWidth() - 2;
int jLabelWidth = jLabel.getMinimumSize().width;
jLabel.setIconTextGap(Math.max(0, columnWidth - jLabelWidth));
}
} else if (columnName.equals(StockpileTableFormat.NAME.getColumnName())) {
Expand Down

0 comments on commit 71ab464

Please sign in to comment.