mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Center land art above combo box
This commit is contained in:
@@ -403,9 +403,12 @@ public class AddBasicLandsDialog {
|
|||||||
|
|
||||||
final Graphics2D g2d = (Graphics2D) g;
|
final Graphics2D g2d = (Graphics2D) g;
|
||||||
|
|
||||||
final BufferedImage img = ImageCache.getImage(card, getWidth(), getHeight());
|
int width = getWidth();
|
||||||
|
int height = getHeight();
|
||||||
|
|
||||||
|
final BufferedImage img = ImageCache.getImage(card, width, height);
|
||||||
if (img != null) {
|
if (img != null) {
|
||||||
g2d.drawImage(img, null, 0, 0);
|
g2d.drawImage(img, null, (width - img.getWidth()) / 2, (height - img.getHeight()) / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user