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

Use focusBorderColor when details is in focus

上级 d8ce0d82
......@@ -228,15 +228,14 @@
display: none;
}
/* Dark theme */
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close{
/* High Contrast and Dark Theming */
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,
.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {
background-image: url('./close-dark.svg');
}
/* High Contrast Theming */
.monaco-editor.hc-black .suggest-widget > .tree,
.monaco-editor.hc-black .suggest-widget > .message {
border-width: 2px;
......
......@@ -29,7 +29,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { attachListStyler } from 'vs/platform/theme/common/styler';
import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
const sticky = false; // for development purposes
......@@ -357,6 +357,8 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
private readonly minWidgetWidth = 430;
private storageService: IStorageService;
private expandDocs: boolean;
private detailsFocusBorderColor: string;
private detailsBorderColor: string;
constructor(
private editor: ICodeEditor,
......@@ -492,6 +494,10 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.details.element.style.borderColor = borderColor.toString();
this.messageElement.style.borderColor = borderColor.toString();
}
let focusBorderColor = theme.getColor(focusBorder);
if (focusBorderColor) {
this.detailsFocusBorderColor = focusBorderColor.toString();
}
}
private onListFocus(e: IListEvent<ICompletionItem>): void {
......@@ -788,8 +794,14 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
toggleDetailsFocus(): void {
if (this.state === State.Details) {
this.setState(State.Open);
if (this.detailsBorderColor) {
this.details.element.style.borderColor = this.detailsBorderColor;
}
} else if (this.state === State.Open) {
this.setState(State.Details);
if (this.detailsFocusBorderColor) {
this.details.element.style.borderColor = this.detailsFocusBorderColor;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册