mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
some electron deprecation fixes
This commit is contained in:
parent
9cce34d949
commit
5057c95e6b
|
@ -6,7 +6,7 @@
|
|||
const path = require('path');
|
||||
const cp = require('child_process');
|
||||
|
||||
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/atom-shell') {
|
||||
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') {
|
||||
console.error("You can't use plain npm to install Code's dependencies.");
|
||||
console.error(
|
||||
/^win/.test(process.platform)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
set npm_config_disturl="https://atom.io/download/atom-shell"
|
||||
set npm_config_disturl="https://atom.io/download/electron"
|
||||
for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a
|
||||
set npm_config_arch="ia32"
|
||||
set npm_config_runtime="electron"
|
||||
|
|
|
@ -22,7 +22,7 @@ ELECTRON_VERSION=$(
|
|||
ELECTRON_GYP_HOME=~/.electron-gyp
|
||||
mkdir -p $ELECTRON_GYP_HOME
|
||||
|
||||
npm_config_disturl=https://atom.io/download/atom-shell \
|
||||
npm_config_disturl=https://atom.io/download/electron \
|
||||
npm_config_target=$ELECTRON_VERSION \
|
||||
npm_config_runtime=electron \
|
||||
HOME=$ELECTRON_GYP_HOME \
|
||||
|
|
4
src/typings/electron.d.ts
vendored
4
src/typings/electron.d.ts
vendored
|
@ -4466,7 +4466,7 @@ declare namespace Electron {
|
|||
/**
|
||||
* Sets the maximum and minimum zoom level.
|
||||
*/
|
||||
setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
|
||||
setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
|
||||
/**
|
||||
* Executes the editing command undo in web page.
|
||||
*/
|
||||
|
@ -5161,7 +5161,7 @@ declare namespace Electron {
|
|||
/**
|
||||
* Sets the maximum and minimum zoom level.
|
||||
*/
|
||||
setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
|
||||
setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
|
||||
/**
|
||||
* Sets a provider for spell checking in input fields and text areas.
|
||||
*/
|
||||
|
|
|
@ -148,7 +148,7 @@ function main() {
|
|||
|
||||
// disable pinch zoom & apply zoom level early to avoid glitches
|
||||
const zoomLevel = configuration.zoomLevel;
|
||||
webFrame.setZoomLevelLimits(1, 1);
|
||||
webFrame.setVisualZoomLevelLimits(1, 1);
|
||||
if (typeof zoomLevel === 'number' && zoomLevel !== 0) {
|
||||
webFrame.setZoomLevel(zoomLevel);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue