center thumbnails

This commit is contained in:
Honfika
2014-03-06 00:22:16 +01:00
parent 7c4cbf34e4
commit b90c12865a
@@ -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);
}