aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-20 13:07:26 -0700
committerAnanya Sen2012-04-20 13:07:26 -0700
commit2fafe26f74f342388b97960e7a58e3f45d8d961f (patch)
tree0d1d20e0f1ac8c44748d727e233b029c5335c0d0 /js
parent3bdd4919ee39759ae6f532d7f3494ca3d97b7255 (diff)
downloadninja-2fafe26f74f342388b97960e7a58e3f45d8d961f.tar.gz
set editor background color as per the selected theme
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/controllers/code-editor-controller.js1
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js6
2 files changed, 7 insertions, 0 deletions
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
218 handleThemeSelection:{ 218 handleThemeSelection:{
219 value: function(){ 219 value: function(){
220 this.application.ninja.documentController.activeDocument.editor.setOption("theme", this.editorTheme); 220 this.application.ninja.documentController.activeDocument.editor.setOption("theme", this.editorTheme);
221 this.application.ninja.stage.stageView.applyTheme("cm-s-"+this.editorTheme);
221 } 222 }
222 }, 223 },
223 224
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, {
201 this.application.ninja.toolsSplitter.restore(); 201 this.application.ninja.toolsSplitter.restore();
202 this.application.ninja.optionsSplitter.restore(); 202 this.application.ninja.optionsSplitter.restore();
203 } 203 }
204 },
205
206 applyTheme:{
207 value:function(themeClass){
208 this.element.className = "codeViewContainer "+themeClass;
209 }
204 } 210 }
205}); \ No newline at end of file 211}); \ No newline at end of file