mirror of
https://github.com/Microsoft/vscode
synced 2024-10-31 10:00:51 +00:00
Fix #56539 - allow selecting text in setting name and description
This commit is contained in:
parent
acaf5a52a6
commit
44a453a196
2 changed files with 12 additions and 7 deletions
|
@ -232,9 +232,15 @@
|
|||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-cat-label-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-label,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-category {
|
||||
font-weight: 600;
|
||||
user-select: text;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-category {
|
||||
|
@ -244,6 +250,8 @@
|
|||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-deprecation-message,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-description {
|
||||
margin-top: 3px;
|
||||
user-select: text;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-deprecation-message {
|
||||
|
|
|
@ -468,8 +468,9 @@ export class SettingsRenderer implements ITreeRenderer {
|
|||
DOM.addClass(container, 'setting-item');
|
||||
DOM.addClass(container, 'setting-item-' + typeClass);
|
||||
const titleElement = DOM.append(container, $('.setting-item-title'));
|
||||
const categoryElement = DOM.append(titleElement, $('span.setting-item-category'));
|
||||
const labelElement = DOM.append(titleElement, $('span.setting-item-label'));
|
||||
const labelCategoryContainer = DOM.append(titleElement, $('.setting-item-cat-label-container'));
|
||||
const categoryElement = DOM.append(labelCategoryContainer, $('span.setting-item-category'));
|
||||
const labelElement = DOM.append(labelCategoryContainer, $('span.setting-item-label'));
|
||||
const isConfiguredElement = DOM.append(titleElement, $('span.setting-item-is-configured-label'));
|
||||
isConfiguredElement.textContent = localize('configured', "Modified");
|
||||
const otherOverridesElement = DOM.append(titleElement, $('span.setting-item-overrides'));
|
||||
|
@ -1138,11 +1139,7 @@ export class SettingsTreeController extends WorkbenchTreeController {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Without this, clicking on the setting description causes the tree to lose focus. I don't know why.
|
||||
// The superclass does not always call it because of DND which is not used here.
|
||||
eventish.preventDefault();
|
||||
|
||||
return super.onLeftClick(tree, element, eventish, origin);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue