Skip to content

Commit

Permalink
less noise when setting zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Oct 7, 2016
1 parent 39c9f26 commit cb83b10
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/vs/workbench/electron-browser/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,12 @@ export abstract class BaseZoomAction extends Action {
target = ConfigurationTarget.WORKSPACE;
}

const applyZoom = (error?: Error) => {
const applyZoom = () => {
webFrame.setZoomLevel(level);
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());
}
}

Expand Down

0 comments on commit cb83b10

Please sign in to comment.