Skip to content

Commit 96d57fd

Browse files
authored
fix more setting widget layout overflows (microsoft#249682)
1 parent 9088548 commit 96d57fd

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@
4949
min-width: 40%;
5050
}
5151

52+
.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-value {
53+
width: 60%;
54+
}
55+
.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-sibling {
56+
width: 40%;
57+
}
58+
.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-value.no-sibling {
59+
width: 100%;
60+
}
61+
5262
.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-object-widget .setting-list-object-input-value,
5363
.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-object-widget .setting-list-object-value {
5464
width: 100%;
@@ -86,6 +96,10 @@
8696
margin-left: 0.5em;
8797
font-size: 0.9em;
8898
white-space: pre;
99+
100+
/* In case the text is too long, we don't want to block the pencil icon. */
101+
box-sizing: border-box;
102+
padding-right: 50px;
89103
}
90104

91105
.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar {

src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,12 @@ export class ListSettingWidget<TListDataItem extends IListDataItem> extends Abst
513513
const siblingElement = DOM.append(rowElement, $('.setting-list-sibling'));
514514

515515
valueElement.textContent = item.value.data.toString();
516-
siblingElement.textContent = item.sibling ? `when: ${item.sibling}` : null;
516+
if (item.sibling) {
517+
siblingElement.textContent = `when: ${item.sibling}`;
518+
} else {
519+
siblingElement.textContent = null;
520+
valueElement.classList.add('no-sibling');
521+
}
517522

518523
this.addDragAndDrop(rowElement, item, idx);
519524
return { rowElement, keyElement: valueElement, valueElement: siblingElement };

0 commit comments

Comments
 (0)