diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index 2031aa672..23b622714 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -172,6 +172,12 @@ public abstract class Mode { try { //theme = new Settings(new File(folder, "theme/theme.txt")); theme = new Settings(Base.getContentFile("lib/theme.txt")); + + File modeTheme = new File(folder, "theme/theme.txt"); + if (modeTheme.exists()) { + // Override the built-in settings with what the theme provides + theme.load(modeTheme); + } // other things that have to be set explicitly for the defaults theme.setColor("run.window.bgcolor", SystemColor.control); diff --git a/app/src/processing/app/Settings.java b/app/src/processing/app/Settings.java index 1d19dbc41..36beb4135 100644 --- a/app/src/processing/app/Settings.java +++ b/app/src/processing/app/Settings.java @@ -67,7 +67,12 @@ public class Settings { public void load() { - String[] lines = PApplet.loadStrings(file); + load(file); + } + + + public void load(File additions) { + String[] lines = PApplet.loadStrings(additions); for (String line : lines) { if ((line.length() == 0) || (line.charAt(0) == '#')) continue; diff --git a/experimental/src/processing/mode/experimental/ExperimentalMode.java b/experimental/src/processing/mode/experimental/ExperimentalMode.java index 6e2f85fd0..50d7ce4b3 100755 --- a/experimental/src/processing/mode/experimental/ExperimentalMode.java +++ b/experimental/src/processing/mode/experimental/ExperimentalMode.java @@ -29,6 +29,7 @@ import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; import processing.app.Base; +import processing.app.Editor; import processing.app.EditorState; import processing.app.Mode; import processing.mode.java.JavaMode; @@ -115,7 +116,7 @@ public class ExperimentalMode extends JavaMode { * Create a new editor associated with this mode. */ @Override - public processing.app.Editor createEditor(Base base, String path, EditorState state) { + public Editor createEditor(Base base, String path, EditorState state) { return new DebugEditor(base, path, state, this); } @@ -133,7 +134,7 @@ public class ExperimentalMode extends JavaMode { if (newString != null) { return newString; } - Logger.getLogger(ExperimentalMode.class.getName()).log(Level.WARNING, "Error loading String: {0}", attribute); + Logger.getLogger(getClass().getName()).log(Level.WARNING, "Error loading String: {0}", attribute); return defaultValue; } diff --git a/experimental/theme/tab-sel-left.gif b/experimental/theme/tab-sel-left.gif deleted file mode 100755 index bdee43c25..000000000 Binary files a/experimental/theme/tab-sel-left.gif and /dev/null differ diff --git a/experimental/theme/tab-sel-menu.gif b/experimental/theme/tab-sel-menu.gif deleted file mode 100755 index d926650e7..000000000 Binary files a/experimental/theme/tab-sel-menu.gif and /dev/null differ diff --git a/experimental/theme/tab-sel-mid.gif b/experimental/theme/tab-sel-mid.gif deleted file mode 100755 index fa8ed45fc..000000000 Binary files a/experimental/theme/tab-sel-mid.gif and /dev/null differ diff --git a/experimental/theme/tab-sel-right.gif b/experimental/theme/tab-sel-right.gif deleted file mode 100755 index d901fdba4..000000000 Binary files a/experimental/theme/tab-sel-right.gif and /dev/null differ diff --git a/experimental/theme/tab-unsel-left.gif b/experimental/theme/tab-unsel-left.gif deleted file mode 100755 index eea22d8d8..000000000 Binary files a/experimental/theme/tab-unsel-left.gif and /dev/null differ diff --git a/experimental/theme/tab-unsel-menu.gif b/experimental/theme/tab-unsel-menu.gif deleted file mode 100755 index a1720a589..000000000 Binary files a/experimental/theme/tab-unsel-menu.gif and /dev/null differ diff --git a/experimental/theme/tab-unsel-mid.gif b/experimental/theme/tab-unsel-mid.gif deleted file mode 100755 index a2c5497b8..000000000 Binary files a/experimental/theme/tab-unsel-mid.gif and /dev/null differ diff --git a/experimental/theme/tab-unsel-right.gif b/experimental/theme/tab-unsel-right.gif deleted file mode 100755 index 91c03f5a9..000000000 Binary files a/experimental/theme/tab-unsel-right.gif and /dev/null differ diff --git a/experimental/theme/theme.txt b/experimental/theme/theme.txt index 838d43666..1a6179f5c 100755 --- a/experimental/theme/theme.txt +++ b/experimental/theme/theme.txt @@ -1,83 +1,3 @@ -# GUI - STATUS -status.notice.fgcolor = #000000 -status.notice.bgcolor = #818b95 -status.error.fgcolor = #ffffff -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 -# (tab images are stored in the lib/theme folder) -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 -console.color = #000000 -console.output.color = #cccccc -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 -mode.button.color = #9ca6b0 - -# GUI - LINESTATUS -linestatus.color = #ffffff -linestatus.bgcolor = #29333d - -# EDITOR - DETAILS - -# foreground and background colors -editor.fgcolor = #000000 -editor.bgcolor = #ffffff - -# highlight for the current line -editor.linehighlight.color=#e2e2e2 -# highlight for the current line -editor.linehighlight=true - -# caret blinking and caret color -editor.caret.color = #333300 - -# color to be used for background when 'external editor' enabled -editor.external.bgcolor = #c8d2dc - -# selection color -editor.selection.color = #ffcc00 - -# area that's not in use by the text (replaced with tildes) -editor.invalid.style = #7e7e7e,bold - -# little pooties at the end of lines that show where they finish -editor.eolmarkers = false -editor.eolmarkers.color = #999999 - -# bracket/brace highlighting -editor.brackethighlight = true -editor.brackethighlight.color = #006699 - - -# LINE STATUS - editor line number status bar at the bottom of the screen -linestatus.font = SansSerif,plain,10 -#linestatus.font.macosx = Helvetica,plain,10 -linestatus.height = 20 - - # DEBUGGER # breakpointed line background color