mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 03:20:45 +00:00
center thumbnails
This commit is contained in:
@@ -119,7 +119,9 @@ public class PreviewImage extends JPanel {
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
if (image != null) {
|
||||
g.drawImage(image, 0, 0, null);
|
||||
int x = (getWidth()- image.getWidth(this)) / 2;
|
||||
int y = (getHeight() - image.getHeight(this)) / 2;
|
||||
g.drawImage(image, x, y, null);
|
||||
} else {
|
||||
renderImageTask(tag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user