Hide bar on linux
Release rolling / release (push) Has been cancelled

This commit is contained in:
Raven Scott
2026-07-14 23:47:22 -04:00
parent 0e74019acc
commit 01f03beb43
+11 -1
View File
@@ -14,7 +14,7 @@
*/
'use strict'
const { app, BrowserWindow, ipcMain, session } = require('electron')
const { app, BrowserWindow, ipcMain, session, Menu } = require('electron')
const path = require('path')
const fs = require('fs')
const os = require('os')
@@ -231,6 +231,9 @@ function createWindow() {
backgroundColor: pkg.pear?.gui?.backgroundColor || '#0f1117',
title: appName,
...(icon ? { icon } : {}),
// Hide the default Electron menu bar (File/Edit/View/…) on Linux/Windows.
// macOS keeps the system menu bar; non-darwin has no app menu (set in whenReady).
autoHideMenuBar: process.platform !== 'darwin',
webPreferences: {
preload: buildPreloadPath(),
// Full peardock UI imports HyperDHT etc. as ESM node packages — same as pear UI.
@@ -293,6 +296,13 @@ app.whenReady().then(async () => {
}
}
// Electron's default app menu (File, Edit, View, Window, Help) is fine on macOS
// (system menu bar) but draws an unwanted menubar inside the window on Linux/Windows.
// Remove it there so only the peardock UI chrome is visible.
if (process.platform !== 'darwin') {
Menu.setApplicationMenu(null)
}
await startStaticServer(appRoot)
await startHolesailControl()