提交 cb83b103 编写于 作者: B Benjamin Pasero

less noise when setting zoom

上级 39c9f26e
...@@ -224,17 +224,12 @@ export abstract class BaseZoomAction extends Action { ...@@ -224,17 +224,12 @@ export abstract class BaseZoomAction extends Action {
target = ConfigurationTarget.WORKSPACE; target = ConfigurationTarget.WORKSPACE;
} }
const applyZoom = (error?: Error) => { const applyZoom = () => {
webFrame.setZoomLevel(level); webFrame.setZoomLevel(level);
browser.setZoomLevel(level); // Ensure others can listen to zoom level changes browser.setZoomLevel(level); // Ensure others can listen to zoom level changes
// Inform user
if (error) {
this.messageService.show(Severity.Error, error);
}
}; };
this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom(error)); this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom());
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册