Removed flatlaf

This commit is contained in:
coolGi
2023-08-27 00:59:36 +09:30
parent 9e43076853
commit 53e8519aab
3 changed files with 8 additions and 10 deletions
+1 -4
View File
@@ -20,8 +20,5 @@ https://github.com/lz4/lz4-java
NightConfig for Json & Toml (config handling)\ NightConfig for Json & Toml (config handling)\
https://github.com/TheElectronWill/night-config https://github.com/TheElectronWill/night-config
SVG Salamander for SVG's\ SVG Salamander for SVG support\
https://github.com/blackears/svgSalamander https://github.com/blackears/svgSalamander
FlatLaf for theming (for development testing, may remove later)\
https://www.formdev.com/flatlaf/
@@ -29,7 +29,6 @@ public class Initializer
Class<?> compressor = LZ4Compressor.class; Class<?> compressor = LZ4Compressor.class;
//Class<?> networking = ByteBuf.class; //Class<?> networking = ByteBuf.class;
Class<?> toml = com.electronwill.nightconfig.core.Config.class; Class<?> toml = com.electronwill.nightconfig.core.Config.class;
Class<?> flatlaf = com.formdev.flatlaf.FlatDarculaLaf.class;
} }
catch (NoClassDefFoundError e) catch (NoClassDefFoundError e)
{ {
@@ -1,8 +1,7 @@
package com.seibel.distanthorizons.core.jar.gui; package com.seibel.distanthorizons.core.jar.gui;
import com.formdev.flatlaf.FlatDarkLaf; import com.kitfox.svg.SVGUniverse;
import com.formdev.flatlaf.FlatLightLaf; import com.kitfox.svg.app.beans.SVGIcon;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.seibel.distanthorizons.core.jar.JarUtils; import com.seibel.distanthorizons.core.jar.JarUtils;
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector; import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
import com.seibel.distanthorizons.core.wrapperInterfaces.config.ILangWrapper; import com.seibel.distanthorizons.core.wrapperInterfaces.config.ILangWrapper;
@@ -13,6 +12,7 @@ import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.URI;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.*; import java.util.*;
import java.util.List; import java.util.List;
@@ -41,7 +41,7 @@ public class BaseJFrame extends JFrame
setTitle(SingletonInjector.INSTANCE.get(ILangWrapper.class).getLang("lod.title")); setTitle(SingletonInjector.INSTANCE.get(ILangWrapper.class).getLang("lod.title"));
try try
{ {
setIconImage(new FlatSVGIcon(JarUtils.accessFile("iconLegacy.svg")).getImage()); // SVG Salamander (the library which we use for svg files) doesn't support css class colors setIconImage(ImageIO.read(JarUtils.accessFile("icon.png")));
} }
catch (Exception e) catch (Exception e)
{ {
@@ -96,7 +96,8 @@ public class BaseJFrame extends JFrame
add(languageBox); add(languageBox);
// ========== THEMING ========== // ========== THEMING ========== //
/**
// TODO: Change the theme to a toggle switch rather than having 2 buttons // TODO: Change the theme to a toggle switch rather than having 2 buttons
int themeButtonSize = 25; int themeButtonSize = 25;
JButton lightMode = null; JButton lightMode = null;
@@ -132,6 +133,7 @@ public class BaseJFrame extends JFrame
// Finally add the buttons // Finally add the buttons
add(lightMode); add(lightMode);
add(darkMode); add(darkMode);
*/
} }
public BaseJFrame addLogo() public BaseJFrame addLogo()