mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-04-29 22:24:32 +02:00
8.17
Dark mode in advanced settings (experimental)
This commit is contained in:
parent
8ce5b11f85
commit
62de862ac8
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.16</version>
|
<version>8.17</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -61,7 +61,6 @@ import static javax.swing.JOptionPane.YES_NO_CANCEL_OPTION;
|
|||||||
import static javax.swing.JOptionPane.showOptionDialog;
|
import static javax.swing.JOptionPane.showOptionDialog;
|
||||||
import javax.swing.JPopupMenu;
|
import javax.swing.JPopupMenu;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIDefaults;
|
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +69,7 @@ import javax.swing.UIManager;
|
|||||||
*/
|
*/
|
||||||
public final class MainPanel {
|
public final class MainPanel {
|
||||||
|
|
||||||
public static final String VERSION = "8.16";
|
public static final String VERSION = "8.17";
|
||||||
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;
|
||||||
@ -107,10 +106,7 @@ public final class MainPanel {
|
|||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
|
|
||||||
setNimbusLookAndFeel();
|
setNimbusLookAndFeel("yes".equals(DBTools.selectSettingValue("dark_mode")));
|
||||||
|
|
||||||
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
|
||||||
defaults.put("nimbusOrange", defaults.get("nimbusFocus"));
|
|
||||||
|
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ package com.tonikelope.megabasterd;
|
|||||||
|
|
||||||
import static com.tonikelope.megabasterd.MainPanel.THREAD_POOL;
|
import static com.tonikelope.megabasterd.MainPanel.THREAD_POOL;
|
||||||
import static com.tonikelope.megabasterd.MainPanel.VERSION;
|
import static com.tonikelope.megabasterd.MainPanel.VERSION;
|
||||||
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
import java.awt.Desktop;
|
import java.awt.Desktop;
|
||||||
@ -99,6 +100,8 @@ import javax.swing.JOptionPane;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JTree;
|
import javax.swing.JTree;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
import javax.swing.UIDefaults;
|
||||||
|
import javax.swing.UIManager;
|
||||||
import javax.swing.border.TitledBorder;
|
import javax.swing.border.TitledBorder;
|
||||||
import javax.swing.tree.DefaultMutableTreeNode;
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
import javax.swing.tree.DefaultTreeModel;
|
import javax.swing.tree.DefaultTreeModel;
|
||||||
@ -280,12 +283,35 @@ public class MiscTools {
|
|||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setNimbusLookAndFeel() {
|
public static void setNimbusLookAndFeel(boolean dark) {
|
||||||
|
|
||||||
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) {
|
||||||
|
// Dark LAF
|
||||||
|
UIManager.put("control", new Color(128, 128, 128));
|
||||||
|
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("nimbusFocus", new Color(115, 164, 209));
|
||||||
|
UIManager.put("nimbusGreen", new Color(176, 179, 50));
|
||||||
|
UIManager.put("nimbusInfoBlue", new Color(66, 139, 221));
|
||||||
|
UIManager.put("nimbusLightBackground", new Color(18, 30, 49));
|
||||||
|
UIManager.put("nimbusOrange", new Color(191, 98, 4));
|
||||||
|
UIManager.put("nimbusRed", new Color(169, 46, 34));
|
||||||
|
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"));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -405,6 +405,9 @@
|
|||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
<Font name="Dialog" size="18" style="0"/>
|
<Font name="Dialog" size="18" style="0"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="ff" green="0" red="33" type="rgb"/>
|
||||||
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="default dir"/>
|
<Property name="text" type="java.lang.String" value="default dir"/>
|
||||||
<Property name="opaque" type="boolean" value="true"/>
|
<Property name="opaque" type="boolean" value="true"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
@ -1010,6 +1013,9 @@
|
|||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
<Font name="Noto Sans" size="18" style="1"/>
|
<Font name="Noto Sans" size="18" style="1"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="ff" green="33" red="0" type="rgb"/>
|
||||||
|
</Property>
|
||||||
<Property name="lineWrap" type="boolean" value="true"/>
|
<Property name="lineWrap" type="boolean" value="true"/>
|
||||||
<Property name="rows" type="int" value="5"/>
|
<Property name="rows" type="int" value="5"/>
|
||||||
<Property name="text" type="java.lang.String" value="THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. 

At the time of writing this text, there is a method to FIX IT:

1) Move first upload subfolder to the ROOT (CLOUD) folder of your account. 

2) Go to account settings and click RELOAD ACCOUNT. 

I don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK."/>
|
<Property name="text" type="java.lang.String" value="THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. 

At the time of writing this text, there is a method to FIX IT:

1) Move first upload subfolder to the ROOT (CLOUD) folder of your account. 

2) Go to account settings and click RELOAD ACCOUNT. 

I don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK."/>
|
||||||
@ -1825,23 +1831,26 @@
|
|||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="font_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="font_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
|
<Component id="font_combo" max="32767" attributes="0"/>
|
||||||
|
<Component id="zoom_spinner" min="-2" pref="351" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="font_combo" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
<Component id="zoom_spinner" min="-2" pref="351" max="-2" attributes="0"/>
|
<Component id="language_combo" min="-2" pref="351" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Component id="dark_mode_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="language_combo" min="-2" pref="351" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -1866,6 +1875,8 @@
|
|||||||
<Component id="language_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="language_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="dark_mode_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -1930,6 +1941,14 @@
|
|||||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="dark_mode_checkbox">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Dialog" size="18" style="1"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="DARK MODE"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Component class="javax.swing.JLabel" name="debug_file_path">
|
<Component class="javax.swing.JLabel" name="debug_file_path">
|
||||||
|
@ -387,6 +387,17 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
proxy_sequential_radio.setSelected(true);
|
proxy_sequential_radio.setSelected(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean dark_mode = false;
|
||||||
|
|
||||||
|
String dark_mode_select = DBTools.selectSettingValue("dark_mode");
|
||||||
|
|
||||||
|
if (dark_mode_select != null) {
|
||||||
|
|
||||||
|
dark_mode = dark_mode_select.equals("yes");
|
||||||
|
}
|
||||||
|
|
||||||
|
dark_mode_checkbox.setSelected(dark_mode);
|
||||||
|
|
||||||
String max_ul_speed = DBTools.selectSettingValue("max_upload_speed");
|
String max_ul_speed = DBTools.selectSettingValue("max_upload_speed");
|
||||||
|
|
||||||
int max_upload_speed = Upload.MAX_TRANSFERENCE_SPEED_DEFAULT;
|
int max_upload_speed = Upload.MAX_TRANSFERENCE_SPEED_DEFAULT;
|
||||||
@ -883,6 +894,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
font_combo = new javax.swing.JComboBox<>();
|
font_combo = new javax.swing.JComboBox<>();
|
||||||
zoom_label = new javax.swing.JLabel();
|
zoom_label = new javax.swing.JLabel();
|
||||||
zoom_spinner = new javax.swing.JSpinner();
|
zoom_spinner = new javax.swing.JSpinner();
|
||||||
|
dark_mode_checkbox = new javax.swing.JCheckBox();
|
||||||
debug_file_path = new javax.swing.JLabel();
|
debug_file_path = new javax.swing.JLabel();
|
||||||
status = new javax.swing.JLabel();
|
status = new javax.swing.JLabel();
|
||||||
|
|
||||||
@ -996,6 +1008,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
default_dir_label.setBackground(new java.awt.Color(153, 255, 153));
|
default_dir_label.setBackground(new java.awt.Color(153, 255, 153));
|
||||||
default_dir_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
default_dir_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||||
|
default_dir_label.setForeground(new java.awt.Color(51, 0, 255));
|
||||||
default_dir_label.setText("default dir");
|
default_dir_label.setText("default dir");
|
||||||
default_dir_label.setOpaque(true);
|
default_dir_label.setOpaque(true);
|
||||||
|
|
||||||
@ -1364,6 +1377,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
public_folder_warning.setBackground(new java.awt.Color(255, 255, 51));
|
public_folder_warning.setBackground(new java.awt.Color(255, 255, 51));
|
||||||
public_folder_warning.setColumns(20);
|
public_folder_warning.setColumns(20);
|
||||||
public_folder_warning.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
|
public_folder_warning.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
|
||||||
|
public_folder_warning.setForeground(new java.awt.Color(0, 51, 255));
|
||||||
public_folder_warning.setLineWrap(true);
|
public_folder_warning.setLineWrap(true);
|
||||||
public_folder_warning.setRows(5);
|
public_folder_warning.setRows(5);
|
||||||
public_folder_warning.setText("THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. \n\nAt the time of writing this text, there is a method to FIX IT:\n\n1) Move first upload subfolder to the ROOT (CLOUD) folder of your account. \n\n2) Go to account settings and click RELOAD ACCOUNT. \n\nI don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK.");
|
public_folder_warning.setText("THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. \n\nAt the time of writing this text, there is a method to FIX IT:\n\n1) Move first upload subfolder to the ROOT (CLOUD) folder of your account. \n\n2) Go to account settings and click RELOAD ACCOUNT. \n\nI don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK.");
|
||||||
@ -1889,25 +1903,30 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
zoom_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
zoom_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||||
zoom_spinner.setDoubleBuffered(true);
|
zoom_spinner.setDoubleBuffered(true);
|
||||||
|
|
||||||
|
dark_mode_checkbox.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
|
||||||
|
dark_mode_checkbox.setText("DARK MODE");
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||||
jPanel2.setLayout(jPanel2Layout);
|
jPanel2.setLayout(jPanel2Layout);
|
||||||
jPanel2Layout.setHorizontalGroup(
|
jPanel2Layout.setHorizontalGroup(
|
||||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
.addComponent(zoom_label)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(font_label))
|
.addComponent(zoom_label)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(font_label))
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(font_combo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addComponent(font_combo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
.addComponent(jLabel2)
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(jLabel2)
|
||||||
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
|
.addComponent(dark_mode_checkbox))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
jPanel2Layout.setVerticalGroup(
|
jPanel2Layout.setVerticalGroup(
|
||||||
@ -1925,6 +1944,8 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(dark_mode_checkbox)
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2102,6 +2123,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
settings.put("force_smart_proxy", force_smart_proxy_checkbox.isSelected() ? "yes" : "no");
|
settings.put("force_smart_proxy", force_smart_proxy_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("reset_slot_proxy", proxy_reset_slot_checkbox.isSelected() ? "yes" : "no");
|
settings.put("reset_slot_proxy", proxy_reset_slot_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("random_proxy", proxy_random_radio.isSelected() ? "yes" : "no");
|
settings.put("random_proxy", proxy_random_radio.isSelected() ? "yes" : "no");
|
||||||
|
settings.put("dark_mode", dark_mode_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("upload_public_folder", upload_public_folder_checkbox.isSelected() ? "yes" : "no");
|
settings.put("upload_public_folder", upload_public_folder_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("smartproxy_ban_time", String.valueOf(bad_proxy_time_spinner.getValue()));
|
settings.put("smartproxy_ban_time", String.valueOf(bad_proxy_time_spinner.getValue()));
|
||||||
settings.put("smartproxy_timeout", String.valueOf(proxy_timeout_spinner.getValue()));
|
settings.put("smartproxy_timeout", String.valueOf(proxy_timeout_spinner.getValue()));
|
||||||
@ -2169,6 +2191,16 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
String zoom = String.valueOf(zoom_spinner.getValue());
|
String zoom = String.valueOf(zoom_spinner.getValue());
|
||||||
|
|
||||||
|
boolean old_dark_mode = false;
|
||||||
|
|
||||||
|
String dark_mode_val = DBTools.selectSettingValue("dark_mode");
|
||||||
|
|
||||||
|
if (dark_mode_val != null) {
|
||||||
|
old_dark_mode = (dark_mode_val.equals("yes"));
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean dark_mode = dark_mode_checkbox.isSelected();
|
||||||
|
|
||||||
boolean old_use_proxy = false;
|
boolean old_use_proxy = false;
|
||||||
|
|
||||||
String use_proxy_val = DBTools.selectSettingValue("use_proxy");
|
String use_proxy_val = DBTools.selectSettingValue("use_proxy");
|
||||||
@ -2242,7 +2274,8 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|| !proxy_host.equals(old_proxy_host)
|
|| !proxy_host.equals(old_proxy_host)
|
||||||
|| !proxy_port.equals(old_proxy_port)
|
|| !proxy_port.equals(old_proxy_port)
|
||||||
|| !proxy_user.equals(old_proxy_user)
|
|| !proxy_user.equals(old_proxy_user)
|
||||||
|| !proxy_pass.equals(old_proxy_pass)) {
|
|| !proxy_pass.equals(old_proxy_pass)
|
||||||
|
|| dark_mode != old_dark_mode) {
|
||||||
|
|
||||||
_main_panel.setRestart(true);
|
_main_panel.setRestart(true);
|
||||||
}
|
}
|
||||||
@ -3416,6 +3449,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
private javax.swing.JLabel custom_chunks_dir_current_label;
|
private javax.swing.JLabel custom_chunks_dir_current_label;
|
||||||
private javax.swing.JLabel custom_proxy_list_label;
|
private javax.swing.JLabel custom_proxy_list_label;
|
||||||
private javax.swing.JTextArea custom_proxy_textarea;
|
private javax.swing.JTextArea custom_proxy_textarea;
|
||||||
|
private javax.swing.JCheckBox dark_mode_checkbox;
|
||||||
private javax.swing.JCheckBox debug_file_checkbox;
|
private javax.swing.JCheckBox debug_file_checkbox;
|
||||||
private javax.swing.JLabel debug_file_path;
|
private javax.swing.JLabel debug_file_path;
|
||||||
private javax.swing.JLabel default_dir_label;
|
private javax.swing.JLabel default_dir_label;
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 207 KiB |
Loading…
x
Reference in New Issue
Block a user