Tunning dark mode disabled text

Truing to mitigate https://github.com/tonikelope/megabasterd/issues/623
This commit is contained in:
tonikelope 2023-12-09 12:29:08 +01:00
parent 7a8f1d5ea3
commit c2c0c764b5
4 changed files with 15 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>8.18</version>
<version>8.19</version>
<packaging>jar</packaging>
<repositories>
<repository>

View File

@ -69,7 +69,7 @@ import javax.swing.UIManager;
*/
public final class MainPanel {
public static final String VERSION = "8.18";
public static final String VERSION = "8.19";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
@ -106,7 +106,14 @@ public final class MainPanel {
public static void main(String args[]) {
setNimbusLookAndFeel("yes".equals(DBTools.selectSettingValue("dark_mode")));
boolean dark = false;
try {
dark = "yes".equals(DBTools.selectSettingValue("dark_mode"));
} catch (Exception ex) {
}
setNimbusLookAndFeel(dark);
if (args.length > 0) {

View File

@ -287,7 +287,9 @@ public class MiscTools {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
if (dark) {
@ -296,7 +298,7 @@ public class MiscTools {
UIManager.put("info", new Color(128, 128, 128));
UIManager.put("nimbusBase", new Color(18, 30, 49));
UIManager.put("nimbusAlertYellow", new Color(248, 187, 0));
UIManager.put("nimbusDisabledText", new Color(128, 128, 128));
UIManager.put("nimbusDisabledText", new Color(100, 100, 100));
UIManager.put("nimbusFocus", new Color(115, 164, 209));
UIManager.put("nimbusGreen", new Color(176, 179, 50));
UIManager.put("nimbusInfoBlue", new Color(66, 139, 221));
@ -306,7 +308,7 @@ public class MiscTools {
UIManager.put("nimbusSelectedText", new Color(255, 255, 255));
UIManager.put("nimbusSelectionBackground", new Color(104, 93, 156));
UIManager.put("text", new Color(230, 230, 230));
// SwingUtilities.updateComponentTreeUI(this);
} else {
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
defaults.put("nimbusOrange", defaults.get("nimbusFocus"));
@ -315,7 +317,7 @@ public class MiscTools {
break;
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
} catch (Exception ex) {
java.util.logging.Logger.getLogger(MiscTools.class.getName()).log(java.util.logging.Level.SEVERE, ex.getMessage());
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 213 KiB