mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
changing 'click and hover' to 'clickAndHover'
This commit is contained in:
parent
d3678a636f
commit
6263d2ed2c
|
@ -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"),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
4
src/vs/monaco.d.ts
vendored
4
src/vs/monaco.d.ts
vendored
|
@ -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<EditorOption.codeLensFontFamily, string>;
|
||||
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
|
||||
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
|
||||
colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn, 'click and hover' | 'click' | 'hover'>;
|
||||
colorDecoratorActivatedOn: IEditorOption<EditorOption.colorDecoratorsActivatedOn, 'clickAndHover' | 'click' | 'hover'>;
|
||||
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
|
||||
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
|
||||
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
|
||||
|
|
Loading…
Reference in a new issue