From 6263d2ed2cb5e297388e6bde0815b10f5e104c55 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Fri, 2 Jun 2023 11:44:41 +0200 Subject: [PATCH] changing 'click and hover' to 'clickAndHover' --- src/vs/editor/common/config/editorOptions.ts | 4 ++-- .../editor/contrib/colorPicker/browser/colorContributions.ts | 2 +- src/vs/editor/contrib/hover/browser/hover.ts | 2 +- src/vs/monaco.d.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index b296c6deeef..c421169589e 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -352,7 +352,7 @@ export interface IEditorOptions { /** * Controls what is the condition to spawn a color picker from a color dectorator */ - colorDecoratorsActivatedOn?: 'click and hover' | 'click' | 'hover'; + colorDecoratorsActivatedOn?: 'clickAndHover' | 'click' | 'hover'; /** * Controls the max number of color decorators that can be rendered in an editor at once. */ @@ -5216,7 +5216,7 @@ export const EditorOptions = { EditorOption.colorDecorators, 'colorDecorators', true, { description: nls.localize('colorDecorators', "Controls whether the editor should render the inline color decorators and color picker.") } )), - colorDecoratorActivatedOn: register(new EditorStringEnumOption(EditorOption.colorDecoratorsActivatedOn, 'colorDecoratorsActivatedOn', 'click and hover' as 'click and hover' | 'hover' | 'click', ['click and hover', 'hover', 'click'] as const, { + colorDecoratorActivatedOn: register(new EditorStringEnumOption(EditorOption.colorDecoratorsActivatedOn, 'colorDecoratorsActivatedOn', 'clickAndHover' as 'clickAndHover' | 'hover' | 'click', ['clickAndHover', 'hover', 'click'] as const, { enumDescriptions: [ nls.localize('editor.colorDecoratorActivatedOn.clickAndHover', "Make the color picker appear both on click and hover of the color decorator"), nls.localize('editor.colorDecoratorActivatedOn.hover', "Make the color picker appear on hover of the color decorator"), diff --git a/src/vs/editor/contrib/colorPicker/browser/colorContributions.ts b/src/vs/editor/contrib/colorPicker/browser/colorContributions.ts index 189aa0cead1..7ff5f54f248 100644 --- a/src/vs/editor/contrib/colorPicker/browser/colorContributions.ts +++ b/src/vs/editor/contrib/colorPicker/browser/colorContributions.ts @@ -34,7 +34,7 @@ export class ColorContribution extends Disposable implements IEditorContribution private onMouseDown(mouseEvent: IEditorMouseEvent) { const colorDecoratorsActivatedOn = this._editor.getOption(EditorOption.colorDecoratorsActivatedOn); - if (colorDecoratorsActivatedOn !== 'click' && colorDecoratorsActivatedOn !== 'click and hover') { + if (colorDecoratorsActivatedOn !== 'click' && colorDecoratorsActivatedOn !== 'clickAndHover') { return; } diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 123c8861526..14c7d208503 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -182,7 +182,7 @@ export class ModesHoverController implements IEditorContribution { if ((mouseOnDecorator && ( (decoratorActivatedOn === 'click' && !this._hoverActivatedByColorDecoratorClick) || (decoratorActivatedOn === 'hover' && !this._isHoverEnabled) || - (decoratorActivatedOn === 'click and hover' && !this._isHoverEnabled && !this._hoverActivatedByColorDecoratorClick))) + (decoratorActivatedOn === 'clickAndHover' && !this._isHoverEnabled && !this._hoverActivatedByColorDecoratorClick))) || !mouseOnDecorator && !this._isHoverEnabled && !this._hoverActivatedByColorDecoratorClick ) { this._hideWidgets(); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index a2258a1852e..502bb90ed7d 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3437,7 +3437,7 @@ declare namespace monaco.editor { /** * Controls what is the condition to spawn a color picker from a color dectorator */ - colorDecoratorsActivatedOn?: 'click and hover' | 'click' | 'hover'; + colorDecoratorsActivatedOn?: 'clickAndHover' | 'click' | 'hover'; /** * Controls the max number of color decorators that can be rendered in an editor at once. */ @@ -4934,7 +4934,7 @@ declare namespace monaco.editor { codeLensFontFamily: IEditorOption; codeLensFontSize: IEditorOption; colorDecorators: IEditorOption; - colorDecoratorActivatedOn: IEditorOption; + colorDecoratorActivatedOn: IEditorOption; colorDecoratorsLimit: IEditorOption; columnSelection: IEditorOption; comments: IEditorOption>>;