From 2fafe26f74f342388b97960e7a58e3f45d8d961f Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 20 Apr 2012 13:07:26 -0700 Subject: set editor background color as per the selected theme Signed-off-by: Ananya Sen --- js/controllers/code-editor-controller.js | 1 + js/stage/stage-view.reel/stage-view.js | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'js') diff --git a/js/controllers/code-editor-controller.js b/js/controllers/code-editor-controller.js index 5dee4ab2..08320db7 100644 --- a/js/controllers/code-editor-controller.js +++ b/js/controllers/code-editor-controller.js @@ -218,6 +218,7 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone handleThemeSelection:{ value: function(){ this.application.ninja.documentController.activeDocument.editor.setOption("theme", this.editorTheme); + this.application.ninja.stage.stageView.applyTheme("cm-s-"+this.editorTheme); } }, diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index 53eff90e..53c6125b 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js @@ -201,5 +201,11 @@ exports.StageView = Montage.create(Component, { this.application.ninja.toolsSplitter.restore(); this.application.ninja.optionsSplitter.restore(); } + }, + + applyTheme:{ + value:function(themeClass){ + this.element.className = "codeViewContainer "+themeClass; + } } }); \ No newline at end of file -- cgit v1.2.3