mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-04-29 22:24:32 +02:00
8.19
Tunning dark mode disabled text Truing to mitigate https://github.com/tonikelope/megabasterd/issues/623
This commit is contained in:
parent
7a8f1d5ea3
commit
c2c0c764b5
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.tonikelope</groupId>
|
<groupId>com.tonikelope</groupId>
|
||||||
<artifactId>MegaBasterd</artifactId>
|
<artifactId>MegaBasterd</artifactId>
|
||||||
<version>8.18</version>
|
<version>8.19</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -69,7 +69,7 @@ import javax.swing.UIManager;
|
|||||||
*/
|
*/
|
||||||
public final class MainPanel {
|
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 boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
|
||||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||||
public static final int DEFAULT_BYTE_BUFFER_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[]) {
|
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) {
|
if (args.length > 0) {
|
||||||
|
|
||||||
|
@ -287,7 +287,9 @@ public class MiscTools {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
||||||
|
|
||||||
if ("Nimbus".equals(info.getName())) {
|
if ("Nimbus".equals(info.getName())) {
|
||||||
|
|
||||||
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
||||||
|
|
||||||
if (dark) {
|
if (dark) {
|
||||||
@ -296,7 +298,7 @@ public class MiscTools {
|
|||||||
UIManager.put("info", new Color(128, 128, 128));
|
UIManager.put("info", new Color(128, 128, 128));
|
||||||
UIManager.put("nimbusBase", new Color(18, 30, 49));
|
UIManager.put("nimbusBase", new Color(18, 30, 49));
|
||||||
UIManager.put("nimbusAlertYellow", new Color(248, 187, 0));
|
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("nimbusFocus", new Color(115, 164, 209));
|
||||||
UIManager.put("nimbusGreen", new Color(176, 179, 50));
|
UIManager.put("nimbusGreen", new Color(176, 179, 50));
|
||||||
UIManager.put("nimbusInfoBlue", new Color(66, 139, 221));
|
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("nimbusSelectedText", new Color(255, 255, 255));
|
||||||
UIManager.put("nimbusSelectionBackground", new Color(104, 93, 156));
|
UIManager.put("nimbusSelectionBackground", new Color(104, 93, 156));
|
||||||
UIManager.put("text", new Color(230, 230, 230));
|
UIManager.put("text", new Color(230, 230, 230));
|
||||||
// SwingUtilities.updateComponentTreeUI(this);
|
|
||||||
} else {
|
} else {
|
||||||
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
||||||
defaults.put("nimbusOrange", defaults.get("nimbusFocus"));
|
defaults.put("nimbusOrange", defaults.get("nimbusFocus"));
|
||||||
@ -315,7 +317,7 @@ public class MiscTools {
|
|||||||
break;
|
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());
|
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 |
Loading…
x
Reference in New Issue
Block a user