TreeView entry selection background is green when TreeView is focused

This commit is contained in:
Nathan Sobo
2012-04-24 13:23:37 -06:00
parent 2e49f12119
commit fd900d5760
2 changed files with 16 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ class TreeView extends View
rootView.prepend(new TreeView(rootView))
@content: (rootView) ->
@div class: 'tree-view', =>
@div class: 'tree-view', tabindex: -1, =>
@subview 'root', new DirectoryView(directory: rootView.project.getRootDirectory(), isExpanded: true)
initialize: (@rootView) ->

View File

@@ -5,6 +5,7 @@
overflow: auto;
padding: 0 1em;
cursor: default;
font: 16px Inconsolata, Monaco, Courier !important;
}
.tree-view .disclosure-arrow {
@@ -13,13 +14,23 @@
}
.tree-view .directory .entries {
padding-left: 2ex;
padding-left: 1ex;
}
.tree-view .file.selected, .tree-view .directory.selected > .header {
background: #333;
.file, .directory > .header {
padding: 0 1ex;
}
.tree-view .directory .entries .file {
padding-left: 2ex;
padding-left: 3ex;
}
.tree-view .file.selected, .tree-view .directory.selected > .header {
background: #444;
}
.tree-view:focus .file.selected, .tree-view:focus .directory.selected > .header {
background: #a3fd97;
color: black;
}