Refactored logos into assets/distanthorizons

This commit is contained in:
coolGi
2024-02-18 19:02:56 +10:30
parent 045c9f46d2
commit 87e5647379
5 changed files with 2 additions and 3 deletions
@@ -29,7 +29,6 @@ import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.List;
@@ -58,7 +57,7 @@ public class BaseJFrame extends JFrame
setTitle(SingletonInjector.INSTANCE.get(ILangWrapper.class).getLang("lod.title"));
try
{
setIconImage(ImageIO.read(JarUtils.accessFile("icon.png")));
setIconImage(ImageIO.read(JarUtils.accessFile("assets/distanthorizons/icon.png")));
}
catch (Exception e)
{
@@ -165,7 +164,7 @@ public class BaseJFrame extends JFrame
super.paintComponent(g);
try
{
BufferedImage image = ImageIO.read(JarUtils.accessFile("logo.png"));
BufferedImage image = ImageIO.read(JarUtils.accessFile("assets/distanthorizons/logo.png"));
int logoWidth = (int) ((double) logoHeight * ((double) image.getWidth() / (double) image.getHeight())); // Calculate the aspect ratio and set the height correctly to not stretch it
g.drawImage(image, (getWidth() / 2) - (logoWidth / 2), 0, logoWidth, logoHeight, this); // Resize image and draw it
}

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 277 KiB