diff --git a/pom.xml b/pom.xml
index 99436785fe9f860630f7719772321b5d2478da16..2eba1f1cee88473b26e811c9b8d1b40be4d21e33 100644
--- a/pom.xml
+++ b/pom.xml
@@ -288,6 +288,25 @@
+
+
+
+ com.googlecode.maven-download-plugin
+
+
+ download-maven-plugin
+
+
+ [1.3.0,)
+
+
+ wget
+
+
+
+
+
+
diff --git a/src/us/deathmarine/luyten/LuytenPreferences.java b/src/us/deathmarine/luyten/LuytenPreferences.java
index d556b05eff46db0eb2906a0e2ee31bb0d7f43918..341e4408935bbca865bcc9c98720b2b21ff57f21 100644
--- a/src/us/deathmarine/luyten/LuytenPreferences.java
+++ b/src/us/deathmarine/luyten/LuytenPreferences.java
@@ -14,6 +14,7 @@ public class LuytenPreferences {
private String themeXml = DEFAULT_THEME_XML;
private String fileOpenCurrentDirectory = "";
private String fileSaveCurrentDirectory = "";
+ private int font_size = 10;
private boolean isPackageExplorerStyle = true;
private boolean isFilterOutInnerClassEntries = true;
@@ -75,4 +76,12 @@ public class LuytenPreferences {
public void setExitByEscEnabled(boolean isExitByEscEnabled) {
this.isExitByEscEnabled = isExitByEscEnabled;
}
+
+ public int getFont_size() {
+ return font_size;
+ }
+
+ public void setFont_size(int font_size) {
+ this.font_size = font_size;
+ }
}
diff --git a/src/us/deathmarine/luyten/OpenFile.java b/src/us/deathmarine/luyten/OpenFile.java
index 30cb70dd9016e25aef69acdca54531aac525d42d..4e45782097d6b03818fb0013f80b3c54c790a873 100644
--- a/src/us/deathmarine/luyten/OpenFile.java
+++ b/src/us/deathmarine/luyten/OpenFile.java
@@ -73,6 +73,9 @@ public class OpenFile implements SyntaxConstants {
RSyntaxTextArea textArea;
String name;
String path;
+
+ private ConfigSaver configSaver;
+ private LuytenPreferences luytenPrefs;
// decompiler and type references (not needed for text files)
private MetadataSystem metadataSystem;
@@ -84,6 +87,10 @@ public class OpenFile implements SyntaxConstants {
this.name = name;
this.path = path;
this.mainWindow = mainWindow;
+
+ configSaver = ConfigSaver.getLoadedInstance();
+ luytenPrefs = configSaver.getLuytenPreferences();
+
textArea = new RSyntaxTextArea(25, 70);
textArea.setCaretPosition(0);
textArea.requestFocusInWindow();
@@ -149,15 +156,19 @@ public class OpenFile implements SyntaxConstants {
fontChooser.setSelectedFont(textArea.getFont());
fontChooser.setSelectedFontSize(textArea.getFont().getSize());
int result = fontChooser.showDialog(mainWindow);
- if (result == JFontChooser.OK_OPTION)
+ if (result == JFontChooser.OK_OPTION) {
textArea.setFont(fontChooser.getSelectedFont());
+ luytenPrefs.setFont_size(fontChooser.getSelectedFontSize());
+ }
}
});
pop.add(item);
textArea.setPopupMenu(pop);
-
+
theme.apply(textArea);
+ textArea.setFont(new Font(textArea.getFont().getName(), textArea.getFont().getStyle(), luytenPrefs.getFont_size()));
+
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
final JScrollBar verticalScrollbar = scrollPane.getVerticalScrollBar();
if (verticalScrollbar != null) {
@@ -225,6 +236,7 @@ public class OpenFile implements SyntaxConstants {
} else {
textArea.setFont(new Font(font.getName(), font.getStyle(), ++size));
}
+ luytenPrefs.setFont_size(size);
} else {
if (scrollPane.isWheelScrollingEnabled() && e.getWheelRotation() != 0) {
JScrollBar toScroll = scrollPane.getVerticalScrollBar();
@@ -373,6 +385,7 @@ public class OpenFile implements SyntaxConstants {
}
}
}
+
e.consume();
}
});