mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-28 20:40:13 +02:00
5.42
-Alternative font with chinese chars support.
This commit is contained in:
parent
113e950d05
commit
8a0a045962
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>5.41</version>
|
||||
<version>5.42</version>
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -41,6 +41,9 @@ public final class LabelTranslatorSingleton {
|
||||
|
||||
private void Spanish() {
|
||||
|
||||
_addTranslation("Font:", "Fuente:");
|
||||
_addTranslation("DEFAULT", "POR DEFECTO");
|
||||
_addTranslation("ALTERNATIVE", "ALTERNATIVA");
|
||||
_addTranslation("Download latest version", "Descargar la última versión");
|
||||
_addTranslation("PROVISION FAILED", "ERROR AL APROVISIONAR");
|
||||
_addTranslation("Error registering download: file is already downloading.", "Error al registrar la descarga: el archivo ya se está descargando.");
|
||||
|
@ -47,7 +47,7 @@ import java.io.File;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "5.41";
|
||||
public static final String VERSION = "5.42";
|
||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||
public static final int STREAMER_PORT = 1337;
|
||||
@ -55,7 +55,7 @@ public final class MainPanel {
|
||||
public static final int DEFAULT_MEGA_PROXY_PORT = 9999;
|
||||
public static final String DEFAULT_LANGUAGE = "EN";
|
||||
public static final boolean DEFAULT_SMART_PROXY = true;
|
||||
public static final Font DEFAULT_FONT = createAndRegisterFont("/fonts/Kalam-Regular.ttf");
|
||||
public static Font DEFAULT_FONT = createAndRegisterFont("/fonts/Kalam-Regular.ttf");
|
||||
public static final float ZOOM_FACTOR = 1.0f;
|
||||
public static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0";
|
||||
public static final String ICON_FILE = "/images/mbasterd_32.png";
|
||||
@ -66,6 +66,7 @@ public final class MainPanel {
|
||||
private static String _proxy_user;
|
||||
private static String _proxy_pass;
|
||||
private static boolean _use_smart_proxy;
|
||||
private static String _font;
|
||||
private static SmartMegaProxyManager _proxy_manager;
|
||||
private static String _language;
|
||||
private static String _new_version;
|
||||
@ -274,6 +275,10 @@ public final class MainPanel {
|
||||
resumeUploads();
|
||||
}
|
||||
|
||||
public static String getFont() {
|
||||
return _font;
|
||||
}
|
||||
|
||||
public static String getNew_version() {
|
||||
return _new_version;
|
||||
}
|
||||
@ -502,6 +507,23 @@ public final class MainPanel {
|
||||
_zoom_factor = ZOOM_FACTOR;
|
||||
}
|
||||
|
||||
String _font = selectSettingValue("font");
|
||||
|
||||
if (_font != null) {
|
||||
if (_font.equals("DEFAULT")) {
|
||||
|
||||
DEFAULT_FONT = createAndRegisterFont("/fonts/Kalam-Regular.ttf");
|
||||
|
||||
} else {
|
||||
|
||||
DEFAULT_FONT = createAndRegisterFont("/fonts/NotoSansCJKtc-Regular.otf");
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
DEFAULT_FONT = createAndRegisterFont("/fonts/Kalam-Regular.ttf");
|
||||
}
|
||||
|
||||
String def_slots = selectSettingValue("default_slots_down");
|
||||
|
||||
if (def_slots != null) {
|
||||
|
@ -51,7 +51,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTabbedPane1" pref="479" max="32767" attributes="0"/>
|
||||
<Component id="jTabbedPane1" max="32767" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="status" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@ -1031,19 +1031,29 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="language_combo" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="zoom_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="zoom_spinner" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="rec_zoom_label" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="zoom_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="zoom_spinner" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="font_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="font_combo" min="-2" pref="444" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="rec_zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Component id="jSeparator2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jSeparator2" min="-2" pref="2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="import_settings_button" min="-2" max="-2" attributes="0"/>
|
||||
@ -1062,26 +1072,38 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSeparator2" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="export_settings_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="import_settings_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="zoom_label" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="zoom_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jButton1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="language_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="export_settings_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="import_settings_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="font_label" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="font_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="zoom_label" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="zoom_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="language_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="39" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jSeparator2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator1" min="-2" max="-2" attributes="0"/>
|
||||
@ -1089,7 +1111,7 @@
|
||||
<Component id="proxy_panel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="rec_zoom_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="78" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -1112,7 +1134,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="use_proxy_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="811" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@ -1238,11 +1260,11 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="proxy_user_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="proxy_user_textfield" pref="305" max="32767" attributes="0"/>
|
||||
<Component id="proxy_user_textfield" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="proxy_pass_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="proxy_pass_textfield" pref="446" max="32767" attributes="0"/>
|
||||
<Component id="proxy_pass_textfield" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -1407,6 +1429,27 @@
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="font_label">
|
||||
<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="Font:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="font_combo">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
@ -469,6 +469,18 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
|
||||
proxy_pass_textfield.setText(DBTools.selectSettingValue("proxy_pass"));
|
||||
|
||||
String font = DBTools.selectSettingValue("font");
|
||||
|
||||
this.font_combo.addItem(LabelTranslatorSingleton.getInstance().translate("DEFAULT"));
|
||||
|
||||
this.font_combo.addItem(LabelTranslatorSingleton.getInstance().translate("ALTERNATIVE"));
|
||||
|
||||
if (font == null) {
|
||||
this.font_combo.setSelectedItem(LabelTranslatorSingleton.getInstance().translate("DEFAULT"));
|
||||
} else {
|
||||
this.font_combo.setSelectedItem(LabelTranslatorSingleton.getInstance().translate(font));
|
||||
}
|
||||
|
||||
String language = DBTools.selectSettingValue("language");
|
||||
|
||||
this.language_combo.addItem(LabelTranslatorSingleton.getInstance().translate("English"));
|
||||
@ -591,6 +603,8 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
jSeparator2 = new javax.swing.JSeparator();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
language_combo = new javax.swing.JComboBox<>();
|
||||
font_label = new javax.swing.JLabel();
|
||||
font_combo = new javax.swing.JComboBox<>();
|
||||
status = new javax.swing.JLabel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
@ -1222,11 +1236,11 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
.addContainerGap()
|
||||
.addComponent(proxy_user_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(proxy_user_textfield, javax.swing.GroupLayout.DEFAULT_SIZE, 305, Short.MAX_VALUE)
|
||||
.addComponent(proxy_user_textfield)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(proxy_pass_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(proxy_pass_textfield, javax.swing.GroupLayout.DEFAULT_SIZE, 446, Short.MAX_VALUE))
|
||||
.addComponent(proxy_pass_textfield))
|
||||
);
|
||||
proxy_auth_panelLayout.setVerticalGroup(
|
||||
proxy_auth_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -1248,7 +1262,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(proxy_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(proxy_panelLayout.createSequentialGroup()
|
||||
.addComponent(use_proxy_checkbox)
|
||||
.addGap(0, 811, Short.MAX_VALUE))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(proxy_panelLayout.createSequentialGroup()
|
||||
.addGroup(proxy_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, proxy_panelLayout.createSequentialGroup()
|
||||
@ -1329,6 +1343,11 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
|
||||
language_combo.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||
|
||||
font_label.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
|
||||
font_label.setText("Font:");
|
||||
|
||||
font_combo.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout advanced_panelLayout = new javax.swing.GroupLayout(advanced_panel);
|
||||
advanced_panel.setLayout(advanced_panelLayout);
|
||||
advanced_panelLayout.setHorizontalGroup(
|
||||
@ -1341,15 +1360,22 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addComponent(jLabel2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(language_combo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addComponent(zoom_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(rec_zoom_label))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(rec_zoom_label)
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addComponent(zoom_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addComponent(font_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(font_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 444, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
@ -1365,27 +1391,35 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSeparator2)
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(export_settings_button)
|
||||
.addComponent(import_settings_button)
|
||||
.addComponent(zoom_label)
|
||||
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jButton1)
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(22, 22, 22))
|
||||
.addComponent(jSeparator2))
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(export_settings_button)
|
||||
.addComponent(import_settings_button))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButton1))
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(font_label)
|
||||
.addComponent(font_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(zoom_label)
|
||||
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGap(0, 39, Short.MAX_VALUE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(proxy_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(rec_zoom_label)
|
||||
.addContainerGap(78, Short.MAX_VALUE))
|
||||
.addGap(47, 47, 47))
|
||||
);
|
||||
|
||||
jTabbedPane1.addTab("Advanced", new javax.swing.ImageIcon(getClass().getResource("/images/icons8-administrative-tools-30.png")), advanced_panel); // NOI18N
|
||||
@ -1415,7 +1449,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE)
|
||||
.addComponent(jTabbedPane1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(status)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
@ -1463,6 +1497,22 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
settings.put("megacrypter_reverse_port", String.valueOf(megacrypter_reverse_port_spinner.getValue()));
|
||||
settings.put("smart_proxy", smart_proxy_checkbox.isSelected() ? "yes" : "no");
|
||||
|
||||
String old_font = DBTools.selectSettingValue("font");
|
||||
|
||||
if (old_font == null) {
|
||||
old_font = "DEFAULT";
|
||||
}
|
||||
|
||||
String font = (String) font_combo.getSelectedItem();
|
||||
|
||||
if (font.equals(LabelTranslatorSingleton.getInstance().translate("DEFAULT"))) {
|
||||
font = "DEFAULT";
|
||||
} else if (font.equals(LabelTranslatorSingleton.getInstance().translate("ALTERNATIVE"))) {
|
||||
font = "ALTERNATIVE";
|
||||
}
|
||||
|
||||
settings.put("font", font);
|
||||
|
||||
String old_language = DBTools.selectSettingValue("language");
|
||||
|
||||
if (old_language == null) {
|
||||
@ -1543,7 +1593,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
|
||||
insertSettingsValues(settings);
|
||||
|
||||
if (!language.equals(old_language) || !zoom.equals(old_zoom)
|
||||
if (!font.equals(old_font) || !language.equals(old_language) || !zoom.equals(old_zoom)
|
||||
|| use_proxy != old_use_proxy
|
||||
|| !proxy_host.equals(old_proxy_host)
|
||||
|| !proxy_port.equals(old_proxy_port)
|
||||
@ -2527,6 +2577,8 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JTable elc_accounts_table;
|
||||
private javax.swing.JCheckBox encrypt_pass_checkbox;
|
||||
private javax.swing.JButton export_settings_button;
|
||||
private javax.swing.JComboBox<String> font_combo;
|
||||
private javax.swing.JLabel font_label;
|
||||
private javax.swing.JButton import_settings_button;
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
|
Binary file not shown.
BIN
src/main/resources/fonts/NotoSansCJKtc-Regular.otf
Normal file
BIN
src/main/resources/fonts/NotoSansCJKtc-Regular.otf
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 180 KiB |
Loading…
x
Reference in New Issue
Block a user