提交 d8ce0d82 编写于 作者: D Daniel Imms

Remove scrollbar from small suggestion docs

上级 78298312
......@@ -9,11 +9,23 @@
width: 660px;
}
.monaco-editor .suggest-widget.docs-expanded > .tree,
.monaco-editor .suggest-widget > .details {
.monaco-editor .suggest-widget.docs-expanded > .tree {
width: 330px;
}
.monaco-editor .suggest-widget > .details {
/* .details does not use border-box, so subtract the border height here (2px). This is the case
because the height of .details is set prorammatically based on .header and .docs, we don't want
our JS to care about the size of the border (which changes based on theme type). */
width: 328px;
}
.monaco-editor .suggest-widget > .details,
.monaco-editor .suggest-widget > .tree {
border-style: solid;
border-width: 1px;
}
.monaco-editor .suggest-widget.small,
.monaco-editor .suggest-widget > .tree,
.monaco-editor .suggest-widget.small.docs-expanded > .tree,
......@@ -30,6 +42,8 @@
.monaco-editor .suggest-widget > .message {
padding-left: 22px;
border-style: solid;
border-width: 1px;
}
.monaco-editor .suggest-widget > .tree {
......@@ -171,7 +185,6 @@
display: flex;
flex-direction: column;
cursor: default;
box-sizing: border-box;
}
.monaco-editor .suggest-widget .details.no-docs {
......@@ -223,6 +236,17 @@
/* High Contrast Theming */
.monaco-editor.hc-black .suggest-widget > .tree,
.monaco-editor.hc-black .suggest-widget > .message {
border-width: 2px;
}
.monaco-editor.hc-black .suggest-widget > .details {
border-width: 2px;
width: 326px;
}
.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon,
.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url('Misc_inverse_16x.svg'); }
......
......@@ -243,7 +243,7 @@ class SuggestionDetails {
this.type.innerText = item.suggestion.detail || '';
this.docs.textContent = item.suggestion.documentation;
this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 8 + 'px';
this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px';
this.close.onmousedown = e => {
e.preventDefault();
......@@ -488,10 +488,9 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
}
let borderColor = theme.getColor(editorSuggestWidgetBorder);
if (borderColor) {
let borderWidth = theme.type === 'hc' ? 2 : 1;
this.listElement.style.border = `${borderWidth}px solid ${borderColor}`;
this.details.element.style.border = `${borderWidth}px solid ${borderColor}`;
this.messageElement.style.border = `${borderWidth}px solid ${borderColor}`;
this.listElement.style.borderColor = borderColor.toString();
this.details.element.style.borderColor = borderColor.toString();
this.messageElement.style.borderColor = borderColor.toString();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册