mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
Use process.platform not os.platform()
This commit is contained in:
parent
fc54b45578
commit
7159b127e2
1 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@
|
||||||
/* eslint import/no-dynamic-require: 0 */
|
/* eslint import/no-dynamic-require: 0 */
|
||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { ipcRenderer, remote } from 'electron';
|
import { ipcRenderer, remote } from 'electron';
|
||||||
import { Emitter } from 'event-kit';
|
import { Emitter } from 'event-kit';
|
||||||
|
@ -586,7 +585,7 @@ export default class AppEnvConstructor {
|
||||||
|
|
||||||
// Extended: Move current window to the center of the screen.
|
// Extended: Move current window to the center of the screen.
|
||||||
center() {
|
center() {
|
||||||
if (os.platform() === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
let dimensions = this.getWindowDimensions();
|
let dimensions = this.getWindowDimensions();
|
||||||
let bounds = remote.screen.getDisplayMatching(dimensions).bounds;
|
let bounds = remote.screen.getDisplayMatching(dimensions).bounds;
|
||||||
let x = bounds.x + ((bounds.width - dimensions.width) / 2);
|
let x = bounds.x + ((bounds.width - dimensions.width) / 2);
|
||||||
|
|
Loading…
Reference in a new issue