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 {BrowserWindow} from 'electron'
|
||||||
import {info, window, splash} from '../../../configuration'
|
import {info, window, splash} from '../../../configuration'
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development") {var devTools = true}
|
if (process.env.NODE_ENV === "development") {var devTools = true}
|
||||||
else if (process.env.NODE_ENV === 'production') {var devTools =false}
|
else if (process.env.NODE_ENV === 'production') {var devTools =false}
|
||||||
|
|
||||||
let mainWindow : BrowserWindow
|
let mainWindow : BrowserWindow
|
||||||
|
|
||||||
|
const {TitlebarRespect} = require('electron-titlebar-respect')
|
||||||
|
TitlebarRespect({})
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
launch: function() {
|
launch: function() {
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
|
@ -15,8 +20,8 @@ module.exports = {
|
||||||
show: false,
|
show: false,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
// frame: false,
|
frame: global.frame,
|
||||||
// titleBarStyle: 'hiddenInset',
|
titleBarStyle: global.titleBarStyle,
|
||||||
vibrancy: 'sidebar', // Window blur effect on macOS
|
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.
|
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
|
trafficLightPosition: { x: 25, y: 28 }, // Position of Traffic Light buttons on macOS
|
||||||
|
|
Reference in a new issue