Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 2 tasks
lishibo opened this issue May 6, 2024 · 0 comments
Open
1 of 2 tasks

Comments

@lishibo
Copy link
Member

lishibo commented May 6, 2024

Reproducible in vscode.dev or in VS Code Desktop?

  • 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 lishibo changed the title [Bug] editor.EditorZoom.setZoomLevel doesn't set the lightBulb correctly [Bug] editor.EditorZoom.setZoomLevel doesn't set the scale for lightBulb icon May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant