mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 06:40:47 +00:00
#1313 Font Change
This commit is contained in:
@@ -77,7 +77,6 @@ import java.awt.BorderLayout;
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.io.BufferedInputStream;
|
||||
@@ -400,7 +399,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
//metadataEditor.setContentType("text/xml");
|
||||
metadataEditor.setEditable(false);
|
||||
|
||||
metadataEditor.setFont(new Font("Monospaced", Font.PLAIN, metadataEditor.getFont().getSize()));
|
||||
metadataEditor.setFont(Configuration.getSourceFont());
|
||||
metadataEditor.changeContentType("text/xml");
|
||||
metadataEditor.addTextChangedListener(this::metadataTextChanged);
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ import com.jpexs.decompiler.flash.tags.text.TextParseException;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
@@ -101,7 +100,7 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
topPanel.add(textSearchPanel);
|
||||
textValue = new LineMarkedEditorPane();
|
||||
add(new JScrollPane(textValue), BorderLayout.CENTER);
|
||||
textValue.setFont(new Font("Monospaced", Font.PLAIN, textValue.getFont().getSize()));
|
||||
textValue.setFont(Configuration.getSourceFont());
|
||||
textValue.changeContentType("text/swftext");
|
||||
textValue.addTextChangedListener(this::textChanged);
|
||||
|
||||
@@ -392,12 +391,10 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
try {
|
||||
TextTag copyTextTag = (TextTag) textTag.cloneTag();
|
||||
if (copyTextTag.setFormattedText(new MissingCharacterHandler() {
|
||||
|
||||
@Override
|
||||
public boolean handle(TextTag textTag, FontTag font, char character) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}, textValue.getText(), null)) {
|
||||
ok = true;
|
||||
mainPanel.showTextTagWithNewValue(textTag, copyTextTag);
|
||||
|
||||
@@ -82,7 +82,6 @@ import de.hameister.treetable.MyTreeTableModel;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@@ -955,7 +954,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
splitPane.setContinuousLayout(true);
|
||||
|
||||
decompiledTextArea.changeContentType("text/actionscript");
|
||||
decompiledTextArea.setFont(new Font("Monospaced", Font.PLAIN, decompiledTextArea.getFont().getSize()));
|
||||
decompiledTextArea.setFont(Configuration.getSourceFont());
|
||||
|
||||
View.addEditorAction(decompiledTextArea, new AbstractAction() {
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.jpexs.decompiler.flash.gui.controls.NoneSelectedButtonGroup;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightSpecialType;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import javax.swing.Box;
|
||||
@@ -53,6 +52,7 @@ public class MethodCodePanel extends JPanel {
|
||||
private final JToggleButton hexButton;
|
||||
|
||||
private final JToggleButton hexOnlyButton;
|
||||
|
||||
private final DocsPanel docsPanel;
|
||||
|
||||
public void refreshMarkers() {
|
||||
@@ -120,7 +120,7 @@ public class MethodCodePanel extends JPanel {
|
||||
sourceTextArea.addDocsListener(docsPanel);
|
||||
add(new JPersistentSplitPane(JSplitPane.VERTICAL_SPLIT, new JScrollPane(sourceTextArea), new JScrollPane(docsPanel), Configuration.guiAvm2DocsSplitPaneDividerLocationPercent));
|
||||
sourceTextArea.changeContentType("text/flasm3");
|
||||
sourceTextArea.setFont(new Font("Monospaced", Font.PLAIN, sourceTextArea.getFont().getSize()));
|
||||
sourceTextArea.setFont(Configuration.getSourceFont());
|
||||
|
||||
buttonsPanel = new JPanel();
|
||||
buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS));
|
||||
|
||||
@@ -60,7 +60,6 @@ import com.jpexs.helpers.Helper;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.io.IOException;
|
||||
@@ -763,8 +762,8 @@ public class ActionPanel extends JPanel implements SearchListener<ActionSearchRe
|
||||
setLayout(new BorderLayout());
|
||||
add(splitPane = new JPersistentSplitPane(JSplitPane.HORIZONTAL_SPLIT, panA, panB, Configuration.guiActionSplitPaneDividerLocationPercent), BorderLayout.CENTER);
|
||||
|
||||
editor.setFont(new Font("Monospaced", Font.PLAIN, editor.getFont().getSize()));
|
||||
decompiledEditor.setFont(new Font("Monospaced", Font.PLAIN, decompiledEditor.getFont().getSize()));
|
||||
editor.setFont(Configuration.getSourceFont());
|
||||
decompiledEditor.setFont(Configuration.getSourceFont());
|
||||
decompiledEditor.changeContentType("text/actionscript");
|
||||
|
||||
editor.addCaretListener(new CaretListener() {
|
||||
|
||||
@@ -443,3 +443,7 @@ config.description.showSetAdvanceValuesMessage = Show again information about se
|
||||
|
||||
config.name.gui.fontSizeMultiplier = Font size multiplier
|
||||
config.description.gui.fontSizeMultiplier = Font size multiplier
|
||||
|
||||
#Do not translate the Font Styles (Plain... etc.)
|
||||
config.name.gui.sourceFont = Source font style
|
||||
config.description.gui.sourceFont = FontName-FontStyle(Plain,Bold,Italic,BoldItalic)-FontSize
|
||||
|
||||
Reference in New Issue
Block a user