提交 1477f20c 编写于 作者: B Benjamin Pasero

more focus indication tweaks

上级 11ab2066
......@@ -50,6 +50,11 @@
border-left-color: #DF740C;
}
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label:active:before,
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label:hover:before {
border: none;
}
.monaco-workbench > .activitybar.left > .content .monaco-action-bar .action-item .action-label:focus:before {
left: 1px;
}
......
......@@ -56,7 +56,6 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas
let leftBinaryContainerElement = document.createElement('div');
leftBinaryContainerElement.className = 'binary-container';
this.leftBinaryContainer = $(leftBinaryContainerElement);
this.leftBinaryContainer.tabindex(0); // enable focus support
// Left Custom Scrollbars
this.leftScrollbar = new ScrollableElement(leftBinaryContainerElement, { horizontal: 'hidden', vertical: 'hidden' });
......@@ -73,7 +72,6 @@ export class BinaryResourceDiffEditor extends BaseEditor implements IVerticalSas
let rightBinaryContainerElement = document.createElement('div');
rightBinaryContainerElement.className = 'binary-container';
this.rightBinaryContainer = $(rightBinaryContainerElement);
this.rightBinaryContainer.tabindex(0); // enable focus support
// Right Custom Scrollbars
this.rightScrollbar = new ScrollableElement(rightBinaryContainerElement, { horizontal: 'hidden', vertical: 'hidden' });
......
......@@ -40,7 +40,6 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor {
let binaryContainerElement = document.createElement('div');
binaryContainerElement.className = 'binary-container monaco-editor-background'; // Inherit the background color from selected theme'
this.binaryContainer = $(binaryContainerElement);
this.binaryContainer.tabindex(0); // enable focus support
parent.getHTMLElement().appendChild(this.binaryContainer.getHTMLElement());
}
......
......@@ -104,12 +104,18 @@
outline: 0 !important; /* tree indicates focus not via outline but through the focussed item */
}
.monaco-shell .activitybar [tabindex="0"]:focus {
outline: 0; /* activity bar indicates focus custom */
.monaco-shell [tabindex="0"]:active,
.monaco-shell select:active,
.monaco-shell input[type="button"]:active,
.monaco-shell input[type="submit"]:active,
.monaco-shell input[type="checkbox"]:active,
.monaco-shell .monaco-tree.focused:active .monaco-tree-rows:empty,
.monaco-shell .monaco-tree.focused.no-item-focus:active .monaco-tree-rows {
outline: 0 !important; /* fixes some flashing outlines from showing up when clicking */
}
.monaco-shell .part.editor .binary-container:focus {
outline: 0; /* binary container indicates focus custom */
.monaco-shell .activitybar [tabindex="0"]:focus {
outline: 0; /* activity bar indicates focus custom */
}
/* END Keyboard Focus Indication Styles */
......
......@@ -17,7 +17,7 @@ import viewer = require('vs/workbench/parts/debug/browser/debugViewer');
const $ = dom.emmet;
const debugTreeOptions = {
indentPixels: 6,
twistiePixels: 12
twistiePixels: 15
};
const MAX_ELEMENTS_SHOWN = 18;
......@@ -42,7 +42,7 @@ export class DebugHoverWidget implements editorbrowser.IContentWidget {
this.tree = new Tree(this.treeContainer, {
dataSource: new viewer.VariablesDataSource(this.debugService),
renderer: this.instantiationService.createInstance(VariablesHoverRenderer),
controller: new DebugHoverController()
controller: new DebugHoverController(editor)
}, debugTreeOptions);
this.tree.addListener2('item:expanded', () => {
this.layoutTree();
......@@ -194,11 +194,16 @@ export class DebugHoverWidget implements editorbrowser.IContentWidget {
class DebugHoverController extends DefaultController {
constructor(private editor: editorbrowser.ICodeEditor) {
super();
}
/* protected */ public onLeftClick(tree: ITree, element: any, eventish: ICancelableEvent, origin: string = 'mouse'): boolean {
if (element.reference > 0) {
super.onLeftClick(tree, element, eventish, origin);
tree.clearFocus();
tree.deselect(element);
this.editor.focus();
}
return true;
......
......@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
.monaco-editor .debug-hover-widget {
padding: 0 3px 0 3px;
border: 1px solid #CCC;
position: absolute;
margin-top: -1px;
......
......@@ -314,8 +314,8 @@ export class ExplorerView extends CollapsibleViewletView {
filter: this.filter,
dnd: dnd
}, {
autoExpandSingleChildren: true
});
autoExpandSingleChildren: true
});
this.toDispose.push(lifecycle.toDisposable(() => renderer.dispose()));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册