diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index e2362dc5f..b116c7b67 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -200,9 +200,6 @@ public abstract class Editor extends JFrame implements RunnerListener { box.add(splitPane); - // hopefully these are no longer needed w/ swing - // (har har har.. that was wishful thinking) -// listener = new PdeKeyListener(this, textarea); pain.add(box); // get shift down/up events so we can show the alt version of toolbar buttons diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index adabae153..54cd90f7a 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -123,8 +123,9 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList mode = editor.getMode(); bgcolor = mode.getColor("buttons.bgcolor"); statusFont = mode.getFont("buttons.status.font"); - statusColor = mode.getColor("buttons.status.color"); - modeTitle = mode.getTitle().toUpperCase(); + statusColor = mode.getColor("buttons.status.color"); + modeTitle = mode.getTitle().toUpperCase(); + modeTextFont = mode.getFont("mode.button.font"); addMouseListener(this); addMouseMotionListener(this); diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index 4b69003c5..ac9c2cfec 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -48,6 +48,13 @@ public abstract class Mode { // Get paths for the libraries and examples in the mode folder examplesFolder = new File(folder, "examples"); librariesFolder = new File(folder, "libraries"); + + try { + theme = new Settings(new File(folder, "theme/theme.txt")); + } catch (IOException e) { + Base.showError("Problem loading theme.txt", + "Could not load theme.txt, please re-install Processing", e); + } } @@ -361,6 +368,7 @@ public abstract class Mode { public Font getFont(String attribute) { + System.out.println("getFont(" + attribute + ") -> " + theme.getFont(attribute)); return theme.getFont(attribute); } diff --git a/app/src/processing/mode/java/JavaEditor.java b/app/src/processing/mode/java/JavaEditor.java index e01f323c4..3ea7782d0 100644 --- a/app/src/processing/mode/java/JavaEditor.java +++ b/app/src/processing/mode/java/JavaEditor.java @@ -35,10 +35,17 @@ import processing.app.SketchException; public class JavaEditor extends Editor { JavaMode jmode; + // TODO this needs prefs to be applied when necessary + PdeKeyListener listener; - + protected JavaEditor(Base base, String path, int[] location, Mode mode) { - super(base, path, location, mode); + super(base, path, location, mode); + + // hopefully these are no longer needed w/ swing + // (har har har.. that was wishful thinking) + listener = new PdeKeyListener(this, textarea); + jmode = (JavaMode) mode; } diff --git a/app/src/processing/mode/java/JavaMode.java b/app/src/processing/mode/java/JavaMode.java index e32378779..4aa367a27 100644 --- a/app/src/processing/mode/java/JavaMode.java +++ b/app/src/processing/mode/java/JavaMode.java @@ -30,7 +30,6 @@ import processing.app.Base; import processing.app.Editor; import processing.app.Mode; import processing.app.RunnerListener; -import processing.app.Settings; import processing.app.Sketch; import processing.app.SketchException; import processing.app.syntax.PdeKeywords; @@ -62,13 +61,6 @@ public class JavaMode extends Mode { "Could not load keywords.txt, please re-install Processing.", e); } - try { - theme = new Settings(new File(folder, "theme/theme.txt")); - } catch (IOException e) { - Base.showError("Problem loading theme.txt", - "Could not load theme.txt, please re-install Processing", e); - } - /* item = newJMenuItem("Export", 'E'); if (editor != null) { diff --git a/build/shared/modes/java/theme/theme.txt b/build/shared/modes/java/theme/theme.txt index 7331b84d6..87d2088c1 100644 --- a/build/shared/modes/java/theme/theme.txt +++ b/build/shared/modes/java/theme/theme.txt @@ -6,6 +6,7 @@ status.error.bgcolor = #662000 status.edit.fgcolor = #000000 status.edit.bgcolor = #cc9900 status.font = SansSerif,plain,12 +#status.font.macosx = Helvetica,plain,12 # GUI - TABS # settings for the tabs at the top @@ -14,6 +15,7 @@ header.bgcolor = #818b95 header.text.selected.color = #1a1a00 header.text.unselected.color = #ffffff header.text.font = SansSerif,plain,12 +#header.text.font.macosx = Helvetica,plain,12 # GUI - CONSOLE # font is handled by preferences, since size/etc is modifiable @@ -24,11 +26,13 @@ console.error.color = #ff3000 # GUI - BUTTONS buttons.bgcolor = #4a545e buttons.status.font = SansSerif,plain,12 +#buttons.status.font.macosx = Helvetica,plain,12 buttons.status.color = #ffffff # GUI - MODE mode.button.bgcolor = #9ca6b0 mode.button.font = SansSerif,plain,9 +#mode.button.font.macosx = Helvetica,plain,9 mode.button.color = #4a545e # GUI - LINESTATUS @@ -101,5 +105,6 @@ editor.comment2.style = #7e7e7e,plain # LINE STATUS - editor line number status bar at the bottom of the screen -linestatus.font = SansSerif,plain,10 +linestatus.font = SansSerif,plain,10 +#linestatus.font.macosx = Helvetica,plain,10 linestatus.height = 20 diff --git a/todo.txt b/todo.txt index c793ccc98..4cd10ac5c 100644 --- a/todo.txt +++ b/todo.txt @@ -39,6 +39,8 @@ o message(new String(b, offset, length), err, false); o http://code.google.com/p/processing/issues/detail?id=197 X couldn't find a good way to reproduce this, closing +_ remove PdeKeyListener, roll it into the Java InputHandler for JEditTextArea + _ can't do fileMenu.add(base.getSketchbookMenu()); inside ThinkDifferent _ sketchbook location hasn't been determined yet