提交 78298312 编写于 作者: R Ramya Achutha Rao

Add close icon to close expanded suggest docs

上级 14c752b7
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-0.994 0 16 16" enable-background="new -0.994 0 16 16"><path fill="#808080" d="M13 6c0 1.461-.636 2.846-1.746 3.797l-5.584 4.951-1.324-1.496 5.595-4.962c.678-.582 1.061-1.413 1.061-2.29 0-1.654-1.345-3-2.997-3-.71 0-1.399.253-1.938.713l-1.521 1.287h2.448l-1.998 2h-3.996v-4l1.998-2v2.692l1.775-1.504c.899-.766 2.047-1.188 3.232-1.188 2.754 0 4.995 2.243 4.995 5z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="3 3 16 16" enable-background="new 3 3 16 16"><polygon fill="#e8e8e8" points="12.597,11.042 15.4,13.845 13.844,15.4 11.042,12.598 8.239,15.4 6.683,13.845 9.485,11.042 6.683,8.239 8.238,6.683 11.042,9.486 13.845,6.683 15.4,8.239"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="3 3 16 16" enable-background="new 3 3 16 16"><polygon fill="#424242" points="12.597,11.042 15.4,13.845 13.844,15.4 11.042,12.598 8.239,15.4 6.683,13.845 9.485,11.042 6.683,8.239 8.238,6.683 11.042,9.486 13.845,6.683 15.4,8.239"/></svg>
\ No newline at end of file
......@@ -73,25 +73,24 @@
font-weight: bold;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back,
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details {
opacity: 0.6;
background-position: center center;
background-repeat: no-repeat;
background-size: 70%;
color: #0035DD;
cursor: pointer;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back {
background-image: url('./back.svg');
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {
background-image: url('./close.svg');
}
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details {
background-image: url('./info.svg');
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back:hover,
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover,
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details:hover {
opacity: 1;
}
......@@ -218,13 +217,8 @@
/* Dark theme */
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header {
border-color: rgba(85,85,85,0.5);
}
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back,
.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details {
color: #4E94CE;
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close{
background-image: url('./close-dark.svg');
}
/* High Contrast Theming */
......
......@@ -185,7 +185,7 @@ const enum State {
class SuggestionDetails {
private el: HTMLElement;
private back: HTMLElement;
private close: HTMLElement;
private header: HTMLElement;
private scrollbar: DomScrollableElement;
private body: HTMLElement;
......@@ -214,8 +214,8 @@ class SuggestionDetails {
this.header = append(this.body, $('.header'));
this.type = append(this.header, $('p.type'));
this.back = append(this.header, $('span.go-back'));
this.back.title = nls.localize('goback', "Read less...{0}", triggerKeybindingLabel);
this.close = append(this.header, $('span.close'));
this.close.title = nls.localize('readLess', "Read less...{0}", triggerKeybindingLabel);
this.docs = append(this.body, $('p.docs'));
this.ariaLabel = null;
......@@ -245,11 +245,11 @@ class SuggestionDetails {
this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 8 + 'px';
this.back.onmousedown = e => {
this.close.onmousedown = e => {
e.preventDefault();
e.stopPropagation();
};
this.back.onclick = e => {
this.close.onclick = e => {
e.preventDefault();
e.stopPropagation();
this.widget.toggleDetails();
......@@ -299,8 +299,8 @@ class SuggestionDetails {
this.el.style.fontSize = fontSizePx;
this.type.style.fontFamily = fontFamily;
this.back.style.height = lineHeightPx;
this.back.style.width = lineHeightPx;
this.close.style.height = lineHeightPx;
this.close.style.width = lineHeightPx;
}
dispose(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册