From 86101047494a327b5d7cf7a7cb4831c2883c28d5 Mon Sep 17 00:00:00 2001 From: 4gray Date: Thu, 21 Jul 2022 16:59:07 +0200 Subject: [PATCH] refactor: update import of custom-electron-titlebar lib --- electron/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electron/main.ts b/electron/main.ts index 7d5fdace9..a1f3457cb 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -4,8 +4,13 @@ import * as path from 'path'; import * as url from 'url'; import { Api } from './api'; import { AppMenu } from './menu'; +const { + setupTitlebar, + attachTitlebarToWindow, +} = require('custom-electron-titlebar/main'); const contextMenu = require('electron-context-menu'); +setupTitlebar(); let win: BrowserWindow | null = null; const args = process.argv.slice(1), serve = args.some((val) => val === '--serve'); @@ -35,6 +40,7 @@ function createWindow(): BrowserWindow { minHeight: 700, title: 'IPTVnator', }); + attachTitlebarToWindow(win); require('@electron/remote/main').enable(win.webContents);