Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
package net.nikr.eve.jeveasset.data.settings;

import java.awt.Color;
import java.awt.Component;
package net.nikr.eve.jeveasset.data.settings;

import com.formdev.flatlaf.FlatLaf;
import java.awt.Color;
import java.awt.Component;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
Expand All @@ -43,11 +44,12 @@ public class ColorSettings {

public static enum PredefinedLookAndFeel {
DEFAULT(null, UIManager.getSystemLookAndFeelClassName(), true),
FLAT_LIGHT(DialoguesSettings.get().lookAndFeelFlatLight(), "com.formdev.flatlaf.FlatLightLaf"),
FLAT_INTELLIJ(DialoguesSettings.get().lookAndFeelFlatIntelliJ(), "com.formdev.flatlaf.FlatIntelliJLaf"),
FLAT_DARK(DialoguesSettings.get().lookAndFeelFlatDark(), "com.formdev.flatlaf.FlatDarkLaf"),
FLAT_DARCULA(DialoguesSettings.get().lookAndFeelFlatDarcula(), "com.formdev.flatlaf.FlatDarculaLaf"),
DARK_NIMBUS(DialoguesSettings.get().lookAndFeelNimbusDark(), DarkNimbus.class.getName()),
FLAT_LIGHT(DialoguesSettings.get().lookAndFeelFlatLight(), "com.formdev.flatlaf.FlatLightLaf"),
FLAT_INTELLIJ(DialoguesSettings.get().lookAndFeelFlatIntelliJ(), "com.formdev.flatlaf.FlatIntelliJLaf"),
FLAT_DARK(DialoguesSettings.get().lookAndFeelFlatDark(), "com.formdev.flatlaf.FlatDarkLaf"),
FLAT_DARK_DARKER(DialoguesSettings.get().lookAndFeelFlatDarkDarker(), FlatDarkDarker.class.getName()),
FLAT_DARCULA(DialoguesSettings.get().lookAndFeelFlatDarcula(), "com.formdev.flatlaf.FlatDarculaLaf"),
DARK_NIMBUS(DialoguesSettings.get().lookAndFeelNimbusDark(), DarkNimbus.class.getName()),
;

private final String name;
Expand Down Expand Up @@ -101,9 +103,17 @@ public String getLookAndFeelClass() {
return lookAndFeelClass;
}

public boolean isFlatLAF() {
return lookAndFeelClass.startsWith("com.formdev.flatlaf");
}
public boolean isFlatLAF() {
if (lookAndFeelClass.startsWith("com.formdev.flatlaf")) {
return true;
}
try {
Class<?> lookAndFeel = Class.forName(lookAndFeelClass);
return FlatLaf.class.isAssignableFrom(lookAndFeel);
} catch (ClassNotFoundException ex) {
return false;
}
}

public void setLookAndFeelClass(String lookAndFeelClass) {
this.lookAndFeelClass = lookAndFeelClass;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright 2009-2025 Contributors (see credits.txt)
*
* This file is part of jEveAssets.
*
* jEveAssets is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* jEveAssets is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with jEveAssets; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
package net.nikr.eve.jeveasset.data.settings;

import com.formdev.flatlaf.FlatDarkLaf;
import java.util.Properties;


public class FlatDarkDarker extends FlatDarkLaf {

@Override
public String getName() {
return "Flat Dark Darker";
}

@Override
protected Properties getAdditionalDefaults() {
Properties properties = new Properties();
Properties defaults = super.getAdditionalDefaults();
if (defaults != null) {
properties.putAll(defaults);
}

// Keep Flat Dark behavior, but shift the base palette darker.
properties.put("@background", "#1A1A1A");
properties.put("@foreground", "#D0D0D0");
properties.put("@disabledForeground", "shade(@foreground,30%)");
properties.put("@buttonBackground", "tint(@background,7%)");
properties.put("@componentBackground", "tint(@background,4%)");
properties.put("@menuBackground", "darken(@background,4%)");
properties.put("@selectionBackground", "#304867");
properties.put("@accentBaseColor", "#3D5F97");

// Improve panel contrast in desktop areas when using very dark backgrounds.
properties.put("Desktop.background", "#161616");
properties.put("Component.borderColor", "tint(@background,16%)");
return properties;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import net.nikr.eve.jeveasset.Program;
import net.nikr.eve.jeveasset.data.settings.Settings;
import net.nikr.eve.jeveasset.gui.images.Images;
import net.nikr.eve.jeveasset.gui.shared.ColorUtil;
import net.nikr.eve.jeveasset.gui.shared.CopyHandler;
import net.nikr.eve.jeveasset.gui.shared.Formatter;
import net.nikr.eve.jeveasset.gui.shared.components.JFixedToolBar;
Expand Down Expand Up @@ -371,11 +370,6 @@ public JStatusLabel(final String toolTip, final Icon icon, AutoNumberFormat form

private void init(final String toolTip, final Icon icon) {
setIcon(icon);
if (ColorUtil.isBrightColor(getBackground())) { //Light background color
setForeground(getBackground().darker().darker().darker());
} else { //Dark background color
setForeground(getBackground().brighter().brighter());
}
setIconTextGap(3);
Comment on lines -374 to 373

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

setToolTipText(GuiShared.get().clickToCopyWrap(toolTip));
setHorizontalAlignment(JLabel.LEFT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public DialoguesSettings(final Locale locale) {
public abstract String lookAndFeelDefaultName(String name);
public abstract String lookAndFeelFlatLight();
public abstract String lookAndFeelFlatDark();
public abstract String lookAndFeelFlatDarkDarker();
public abstract String lookAndFeelFlatIntelliJ();
public abstract String lookAndFeelFlatDarcula();
public abstract String lookAndFeelNimbusDark();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ lookAndFeelDefault=Default
lookAndFeelDefaultName=Default ({0})
lookAndFeelFlatLight=Flat Light
lookAndFeelFlatDark=Flat Dark
lookAndFeelFlatDarkDarker=Flat Dark (Darker)
lookAndFeelFlatIntelliJ=Flat IntelliJ
lookAndFeelFlatDarcula=Flat Darcula
lookAndFeelNimbusDark=Dark Nimbus
Expand Down Expand Up @@ -267,4 +268,4 @@ windowWidth=Width:
windowHeight=Height:
windowX=X Position:
windowY=Y Position:
windowMaximised=Maximized:
windowMaximised=Maximized: