mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-24 08:15:51 +01:00
Settings editor - 💄
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 (<any>group).count !== 0;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user