monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

[Bug] editor.EditorZoom.setZoomLevel doesn't set the scale for lightBulb icon

Open lishibo opened this issue 2 years ago • 0 comments

Reproducible in vscode.dev or in VS Code Desktop?

  • [X] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

Playground repro

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `function hello() {
	alert('Hello world!');
	functi abc() {
		abc = 123
		return asdf();
	}
};
`;

monaco.languages.registerCodeActionProvider("javascript", {
    provideCodeActions: (model, range, context, token) => {
        const actions = context.markers.map(error => {
            return {
                title: `My quickfix`, // Name of quickfix
                diagnostics: [error],
                kind: "abc",
                edit: {
                    edits: [
                        {
                            resource: model.uri,
                            textEdit: {
                                range: error,
                                text: "replacement text" // text to replace with
                            },
							versionId: 1
                        }
                    ]
                },
                isPreferred: true
            };
        });
        return {
            actions: actions,
            dispose: () => {}
        }
    }
});

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	automaticLayout: true,
	lightbulb: {
		enabled: monaco.editor.ShowLightbulbIconMode.On
	},
});

monaco.editor.EditorZoom.setZoomLevel(20)

Reproduction Steps

  • Click on the error code (functi)
  • Notice the size of the lightBulb on the left

Actual (Problematic) Behavior

image

Expected Behavior

If I don't use setZoomLevel, but instead set the zoom of the whole browser tab, the size looks correct: image

Additional Context

No response

lishibo avatar May 06 '24 23:05 lishibo