[MM-22751] Removed Windows 10 style border for non-Windows 10 clients (#1322)
* [MM-22751] Removed Windows 10 style border for non-Windows 10 clients * Lint fix
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
|
||||
import {app, BrowserWindow} from 'electron';
|
||||
|
||||
@@ -19,6 +20,10 @@ function saveWindowState(file, window) {
|
||||
}
|
||||
}
|
||||
|
||||
function isFramelessWindow() {
|
||||
return os.platform() === 'darwin' || (os.platform() === 'win32' && os.release().startsWith('10'));
|
||||
}
|
||||
|
||||
function createMainWindow(config, options) {
|
||||
const defaultWindowWidth = 1000;
|
||||
const defaultWindowHeight = 700;
|
||||
@@ -51,7 +56,7 @@ function createMainWindow(config, options) {
|
||||
show: hideOnStartup || false,
|
||||
minWidth: minimumWindowWidth,
|
||||
minHeight: minimumWindowHeight,
|
||||
frame: false,
|
||||
frame: !isFramelessWindow(),
|
||||
fullscreen: false,
|
||||
titleBarStyle: 'hiddenInset',
|
||||
backgroundColor: '#fff', // prevents blurry text: https://electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
|
||||
@@ -65,6 +70,7 @@ function createMainWindow(config, options) {
|
||||
|
||||
const mainWindow = new BrowserWindow(windowOptions);
|
||||
mainWindow.deeplinkingUrl = options.deeplinkingUrl;
|
||||
mainWindow.setMenuBarVisibility(false);
|
||||
|
||||
const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`;
|
||||
mainWindow.loadURL(indexURL);
|
||||
|
Reference in New Issue
Block a user