1
Fork 0

Get Electron Titlebar Respect work nicely with TS

This commit is contained in:
Korbs 2023-08-30 16:17:22 -04:00
parent ccdbff838f
commit be60e0d7cd
No known key found for this signature in database

View file

@ -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