From ce184d9ec728bfc8c717290f7c7dffb6a3514643 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 Mar 2021 12:56:05 +0200 Subject: [PATCH] fixes #119825 --- .../workbench/browser/parts/editor/untitledHint.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/untitledHint.ts b/src/vs/workbench/browser/parts/editor/untitledHint.ts index f06f57d79fc..dfc69e86bb2 100644 --- a/src/vs/workbench/browser/parts/editor/untitledHint.ts +++ b/src/vs/workbench/browser/parts/editor/untitledHint.ts @@ -9,7 +9,7 @@ import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentW import { localize } from 'vs/nls'; import { DEFAULT_FONT_FAMILY } from 'vs/workbench/browser/style'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry'; +import { inputPlaceholderForeground, textLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { ChangeModeAction } from 'vs/workbench/browser/parts/editor/editorStatus'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; @@ -118,7 +118,8 @@ class UntitledHintContentWidget implements IContentWidget { if (!this.domNode) { this.domNode = $('.untitled-hint'); this.domNode.style.width = 'max-content'; - const language = $('span.language-mode.detected-link-active'); + const language = $('a.language-mode'); + language.style.cursor = 'pointer'; const keybinding = this.keybindingService.lookupKeybinding(ChangeModeAction.ID); const keybindingLabel = keybinding?.getLabel(); const keybindingWithBrackets = keybindingLabel ? `(${keybindingLabel})` : ''; @@ -128,7 +129,8 @@ class UntitledHintContentWidget implements IContentWidget { toGetStarted.innerText = localize('toGetStarted', " to get started. Start typing to dismiss, or ",); this.domNode.appendChild(toGetStarted); - const dontShow = $('span.detected-link-active'); + const dontShow = $('a'); + dontShow.style.cursor = 'pointer'; dontShow.innerText = localize('dontshow', "don't show"); this.domNode.appendChild(dontShow); @@ -180,4 +182,8 @@ registerThemingParticipant((theme, collector) => { if (inputPlaceholderForegroundColor) { collector.addRule(`.monaco-editor .contentWidgets .untitled-hint { color: ${inputPlaceholderForegroundColor}; }`); } + const textLinkForegroundColor = theme.getColor(textLinkForeground); + if (textLinkForegroundColor) { + collector.addRule(`.monaco-editor .contentWidgets .untitled-hint a { color: ${textLinkForegroundColor}; }`); + } });