提交 43cdb2c6 编写于 作者: R Rachel Macfarlane
上级 346b9770
......@@ -25,7 +25,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { IModelService } from 'vs/editor/common/services/modelService';
import { SimpleCommentEditor } from './simpleCommentEditor';
import URI from 'vs/base/common/uri';
import { transparent, editorForeground, inputValidationErrorBorder, textLinkActiveForeground, textLinkForeground, focusBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry';
import { transparent, editorForeground, inputValidationErrorBorder, textLinkActiveForeground, textLinkForeground, focusBorder, textBlockQuoteBackground, textBlockQuoteBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
......@@ -477,8 +477,8 @@ export class ReviewZoneWidget extends ZoneWidget {
}
private setCommentEditorDecorations() {
if (this._commentEditor) {
let model = this._commentEditor.getModel();
const model = this._commentEditor && this._commentEditor.getModel();
if (model) {
let valueLength = model.getValueLength();
const hasExistingComments = this._commentThread.comments.length > 0;
let placeholder = valueLength > 0 ? '' : (hasExistingComments ? 'Reply...' : 'Type a new comment');
......@@ -579,6 +579,7 @@ export class ReviewZoneWidget extends ZoneWidget {
const focusColor = theme.getColor(focusBorder);
if (focusColor) {
content.push(`.monaco-editor .review-widget .body .review-comment a:focus { outline: 1px solid ${focusColor}; }`);
content.push(`.monaco-editor .review-widget .body .comment-form .monaco-editor.focused { outline: 1px solid ${focusColor}; }`);
}
const blockQuoteBackground = theme.getColor(textBlockQuoteBackground);
......@@ -591,6 +592,12 @@ export class ReviewZoneWidget extends ZoneWidget {
content.push(`.monaco-editor .review-widget .body .review-comment blockquote { border-color: ${blockQuoteBOrder}; }`);
}
const hcBorder = theme.getColor(contrastBorder);
if (hcBorder) {
content.push(`.monaco-editor .review-widget .body .comment-form .review-thread-reply-button { outline-color: ${hcBorder}; }`);
content.push(`.monaco-editor .review-widget .body .comment-form .monaco-editor { outline: 1px solid ${hcBorder}; }`);
}
this._styleElement.innerHTML = content.join('\n');
// Editor decorations should also be responsive to theme changes
......
......@@ -149,6 +149,7 @@
white-space: nowrap;
border: 0px;
cursor: text;
outline: 1px solid transparent;
}
.monaco-editor .review-widget .body .comment-form .review-thread-reply-button:focus {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册