fix(in-app-menu): custom-electron-titlebar

This commit is contained in:
JellyBrick
2023-08-29 19:37:31 +09:00
parent 897cfd3c7d
commit 92da06eb96
4 changed files with 9 additions and 8 deletions

2
package-lock.json generated
View File

@ -21,7 +21,6 @@
"butterchurn-presets": "2.4.7",
"custom-electron-prompt": "1.5.7",
"custom-electron-titlebar": "4.2.7",
"electron": "26.1.0",
"electron-better-web-request": "1.0.1",
"electron-debug": "3.2.0",
"electron-is": "3.0.0",
@ -46,6 +45,7 @@
"@playwright/test": "1.37.1",
"auto-changelog": "2.4.0",
"del-cli": "5.0.1",
"electron": "26.1.0",
"electron-builder": "24.6.3",
"electron-devtools-installer": "3.2.0",
"eslint": "8.48.0",

View File

@ -91,6 +91,7 @@
"build:mac": "npm run clean && electron-builder --mac dmg:x64 -p never",
"build:mac:arm64": "npm run clean && electron-builder --mac dmg:arm64 -p never",
"build:win": "npm run clean && electron-builder --win -p never",
"build:win:x64": "npm run clean && electron-builder --win nsis:x64 -p never",
"lint": "xo",
"changelog": "auto-changelog",
"plugins": "npm run plugin:adblocker && npm run plugin:bypass-age-restrictions",
@ -115,7 +116,6 @@
"butterchurn-presets": "2.4.7",
"custom-electron-prompt": "1.5.7",
"custom-electron-titlebar": "4.2.7",
"electron": "26.1.0",
"electron-better-web-request": "1.0.1",
"electron-debug": "3.2.0",
"electron-is": "3.0.0",
@ -144,6 +144,7 @@
"@playwright/test": "1.37.1",
"auto-changelog": "2.4.0",
"del-cli": "5.0.1",
"electron": "26.1.0",
"electron-builder": "24.6.3",
"electron-devtools-installer": "3.2.0",
"eslint": "8.48.0",

View File

@ -1,5 +1,5 @@
const { ipcRenderer } = require('electron');
const { Titlebar, Color } = require('custom-electron-titlebar');
const { Titlebar, TitlebarColor } = require('custom-electron-titlebar');
const config = require('../../config');
const { isEnabled } = require('../../config/plugins');
@ -12,9 +12,9 @@ module.exports = () => {
const visible = () => Boolean($('.cet-menubar').firstChild);
const bar = new Titlebar({
icon: 'https://cdn-icons-png.flaticon.com/512/5358/5358672.png',
backgroundColor: Color.fromHex('#050505'),
itemBackgroundColor: Color.fromHex('#1d1d1d'),
svgColor: Color.WHITE,
backgroundColor: TitlebarColor.fromHex('#050505'),
itemBackgroundColor: TitlebarColor.fromHex('#1d1d1d'),
svgColor: TitlebarColor.WHITE,
menu: config.get('options.hideMenu') ? null : undefined,
});
bar.updateTitle(' ');

View File

@ -1,8 +1,8 @@
const { Titlebar, Color } = require('custom-electron-titlebar');
const { Titlebar, TitlebarColor } = require('custom-electron-titlebar');
module.exports = () => {
new Titlebar({
backgroundColor: Color.fromHex('#050505'),
backgroundColor: TitlebarColor.fromHex('#050505'),
minimizable: false,
maximizable: false,
menu: null,