From a97619168c908e38e76b6ff91be37c445b59bb19 Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 30 Aug 2010 04:25:15 +0000 Subject: [PATCH] anti-aliased fonts pref for the prefs window --- app/src/processing/app/Preferences.java | 18 ++++++++++++++++++ todo.txt | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index 0220a2ecc..d2c5f54e1 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -112,6 +112,7 @@ public class Preferences { int wide, high; JTextField sketchbookLocationField; + JCheckBox editorAntialiasBox; JCheckBox exportSeparateBox; JCheckBox deletePreviousBox; JCheckBox externalEditorBox; @@ -279,6 +280,19 @@ public class Preferences { top += d.height + GUI_BETWEEN; + // [ ] Use smooth text in editor window + + editorAntialiasBox = + new JCheckBox("Use smooth text in editor window " + + "(requires restart of Processing)"); + pain.add(editorAntialiasBox); + d = editorAntialiasBox.getPreferredSize(); + // adding +10 because ubuntu + jre 1.5 truncating items + editorAntialiasBox.setBounds(left, top, d.width + 10, d.height); + right = Math.max(right, left + d.width); + top += d.height + GUI_BETWEEN; + + // [ ] Increase maximum available memory to [______] MB Container memoryBox = Box.createHorizontalBox(); @@ -487,6 +501,8 @@ public class Preferences { * then send a message to the editor saying that it's time to do the same. */ protected void applyFrame() { + setBoolean("editor.antialias", editorAntialiasBox.isSelected()); + // put each of the settings into the table setBoolean("export.applet.separate_jar_files", exportSeparateBox.isSelected()); @@ -556,6 +572,8 @@ public class Preferences { protected void showFrame(Editor editor) { this.editor = editor; + editorAntialiasBox.setSelected(getBoolean("editor.antialias")); + // set all settings entry boxes to their actual status exportSeparateBox. setSelected(getBoolean("export.applet.separate_jar_files")); diff --git a/todo.txt b/todo.txt index 758d9dda3..ac26b8f22 100644 --- a/todo.txt +++ b/todo.txt @@ -1,7 +1,8 @@ 0191 X remove unused librariesClassPath X http://code.google.com/p/processing/issues/detail?id=360 - +X add antialias option to the editor prefs window +X add smoothing inside the Linux GUI, was looking nasty mode work _ locations: sketchbook, examples, libraries