the editor has it's own blurred state independent of the window

This commit is contained in:
Justin Palmer 2013-02-04 16:20:07 -08:00
parent 951f6128ca
commit f8855ef2e3
2 changed files with 10 additions and 0 deletions

View File

@ -351,10 +351,12 @@ class Editor extends View
@hiddenInput.on 'focus', =>
@rootView()?.editorFocused(this)
@isFocused = true
@removeClass 'is-blurred'
@hiddenInput.on 'focusout', =>
@isFocused = false
@autosave() if config.get "editor.autosave"
@addClass 'is-blurred'
@underlayer.on 'click', (e) =>
return unless e.target is @underlayer[0]

View File

@ -76,6 +76,10 @@
opacity: 1;
}
.editor.is-blurred .line.cursor-line {
opacity: 0;
}
.editor .invisible {
opacity: 0.2;
}
@ -156,3 +160,7 @@
pointer-events: none;
z-index: -1;
}
.editor.is-blurred .selection .region {
opacity: 0;
}