Get Electron Titlebar Respect work nicely with TS
This commit is contained in:
parent
ccdbff838f
commit
be60e0d7cd
1 changed files with 7 additions and 2 deletions
|
@ -1,9 +1,14 @@
|
|||
import {BrowserWindow} from 'electron'
|
||||
import {info, window, splash} from '../../../configuration'
|
||||
|
||||
if (process.env.NODE_ENV === "development") {var devTools = true}
|
||||
else if (process.env.NODE_ENV === 'production') {var devTools =false}
|
||||
|
||||
let mainWindow : BrowserWindow
|
||||
|
||||
const {TitlebarRespect} = require('electron-titlebar-respect')
|
||||
TitlebarRespect({})
|
||||
|
||||
module.exports = {
|
||||
launch: function() {
|
||||
mainWindow = new BrowserWindow({
|
||||
|
@ -15,8 +20,8 @@ module.exports = {
|
|||
show: false,
|
||||
autoHideMenuBar: true,
|
||||
transparent: true,
|
||||
// frame: false,
|
||||
// titleBarStyle: 'hiddenInset',
|
||||
frame: global.frame,
|
||||
titleBarStyle: global.titleBarStyle,
|
||||
vibrancy: 'sidebar', // Window blur effect on macOS
|
||||
backgroundMaterial: 'auto', // Window blur effect on Windows. Note: This method is only supported on Windows 11 22H2 and up.
|
||||
trafficLightPosition: { x: 25, y: 28 }, // Position of Traffic Light buttons on macOS
|
||||
|
|
Reference in a new issue