diff --git a/src/vs/workbench/parts/preferences/browser/media/settingsEditor2.css b/src/vs/workbench/parts/preferences/browser/media/settingsEditor2.css index b6ea2ae5985c7a56d4508d102ef6995abba25ff2..d1795d7f1aeddf3bfcac1092806b13095dc2c966 100644 --- a/src/vs/workbench/parts/preferences/browser/media/settingsEditor2.css +++ b/src/vs/workbench/parts/preferences/browser/media/settingsEditor2.css @@ -147,16 +147,10 @@ height: 100%; } -.settings-editor > .settings-body > .settings-tree-container .setting-item.odd:not(.focused):not(.selected):not(:hover), -.settings-editor > .settings-body > .settings-tree-container .monaco-tree:not(:focus) .setting-item.focused.odd:not(.selected):not(:hover), -.settings-editor > .settings-body > .settings-tree-container .monaco-tree:not(.focused) .setting-item.focused.odd:not(.selected):not(:hover) { - background-color: rgba(130, 130, 130, 0.04); -} - -.settings-editor > .settings-body > .settings-tree-container .setting-item > .setting-item-left { - flex: 1; - padding-top: 3px; - padding-bottom: 12px; +.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-title .setting-item-is-configured-label { @@ -220,7 +214,7 @@ width: 16px; border: 1px solid transparent; border-radius: 3px; - margin-right: 3px; + margin-right: 4px; margin-left: 0px; margin-top: 4px; padding: 0px; @@ -262,7 +256,7 @@ padding-left: 0px; } -.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-value > .edit-in-settings-button + .setting-reset-button.monaco-button { +.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-value > .setting-type-complex + .reset-button-container > .setting-reset-button.monaco-button { display: none; } @@ -272,7 +266,7 @@ height: 26px; } -.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-value > .setting-reset-button.monaco-button { +.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-reset-button.monaco-button { text-align: left; display: inline-block; visibility: hidden; @@ -281,7 +275,7 @@ padding-top: 2px; } -.settings-editor > .settings-body > .settings-tree-container .setting-item.is-configured .setting-item-value > .setting-reset-button.monaco-button { +.settings-editor > .settings-body > .settings-tree-container .setting-item.is-configured .setting-reset-button.monaco-button { visibility: visible; } diff --git a/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts b/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts index cad78ca9251e71b1d5f849ff56a1ccc0036fbe00..37c19dfb3aa8978d5eae0989dd7b1b646d1cd985 100644 --- a/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts +++ b/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts @@ -250,21 +250,11 @@ export class SettingsEditor2 extends BaseEditor { this.refreshTreeAndMaintainFocus(); } else if (this.settingsTreeModel) { const element = e.selection[0]; - const currentSelection = this.settingsTree.getSelection()[0]; - const isEqualOrParent = (element: SettingsTreeElement, candidate: SettingsTreeElement) => { - do { - if (element === candidate) { - return true; - } - } while (element = element.parent); - - return false; - }; - - if (element && !e.payload.fromScroll && (!currentSelection || !isEqualOrParent(currentSelection, element))) { + if (element && !e.payload.fromScroll) { this.settingsTree.reveal(element, 0); this.settingsTree.setSelection([element]); this.settingsTree.setFocus(element); + this.settingsTree.domFocus(); } } })); diff --git a/src/vs/workbench/parts/preferences/browser/settingsTree.ts b/src/vs/workbench/parts/preferences/browser/settingsTree.ts index 5587fbcf5ef0986ddf1f2b9339f1c794224d7e06..9358cfeb788a70f36e182b60d4b28d8c9ca66093 100644 --- a/src/vs/workbench/parts/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/parts/preferences/browser/settingsTree.ts @@ -541,7 +541,8 @@ export class SettingsRenderer implements IRenderer { }; // Prevent clicks from being handled by list - toDispose.push(DOM.addDisposableListener(valueElement, 'mousedown', (e: IMouseEvent) => e.stopPropagation())); + toDispose.push(DOM.addDisposableListener(controlElement, 'mousedown', (e: IMouseEvent) => e.stopPropagation())); + toDispose.push(DOM.addDisposableListener(resetButtonElement, 'mousedown', (e: IMouseEvent) => e.stopPropagation())); toDispose.push(DOM.addStandardDisposableListener(valueElement, 'keydown', (e: StandardKeyboardEvent) => { if (e.keyCode === KeyCode.Escape) { diff --git a/src/vs/workbench/parts/preferences/browser/tocTree.ts b/src/vs/workbench/parts/preferences/browser/tocTree.ts index e7e175e1661a212cc04210d03f17324fbd3ba8cc..f463c6e3d7a3a48ecbb69d7e76b0d5f602c74f05 100644 --- a/src/vs/workbench/parts/preferences/browser/tocTree.ts +++ b/src/vs/workbench/parts/preferences/browser/tocTree.ts @@ -88,8 +88,9 @@ export class TOCDataSource implements IDataSource { } private _getChildren(element: TOCTreeElement): SettingsTreeElement[] { + // TODO@roblou hack. Clean up or remove this option if (this.configService.getValue('workbench.settings.settingsSearchTocBehavior') === 'filter') { - const children = element.children as SettingsTreeElement[]; // ???? + const children = element.children as SettingsTreeElement[]; // TS???? return children.filter(group => { return (group).count !== 0; });