mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
fix(electron): autohide menu bar on linux (#5890)
This commit is contained in:
@@ -4,7 +4,7 @@ import { join } from 'node:path';
|
||||
import { BrowserWindow, type CookiesSetDetails, nativeTheme } from 'electron';
|
||||
import electronWindowState from 'electron-window-state';
|
||||
|
||||
import { isMacOS, isWindows } from '../shared/utils';
|
||||
import { isLinux, isMacOS, isWindows } from '../shared/utils';
|
||||
import { mainWindowOrigin } from './constants';
|
||||
import { ensureHelperProcess } from './helper-process';
|
||||
import { logger } from './logger';
|
||||
@@ -49,6 +49,7 @@ async function createWindow(additionalArguments: string[]) {
|
||||
x: mainWindowState.x,
|
||||
y: mainWindowState.y,
|
||||
width: mainWindowState.width,
|
||||
autoHideMenuBar: isLinux(),
|
||||
minWidth: 640,
|
||||
minHeight: 480,
|
||||
visualEffectState: 'active',
|
||||
|
||||
@@ -12,6 +12,10 @@ export const isWindows = () => {
|
||||
return process.platform === 'win32';
|
||||
};
|
||||
|
||||
export const isLinux = () => {
|
||||
return process.platform === 'win32';
|
||||
};
|
||||
|
||||
interface MessagePortLike {
|
||||
postMessage: (data: unknown) => void;
|
||||
addListener: (event: 'message', listener: (...args: any[]) => void) => void;
|
||||
|
||||
Reference in New Issue
Block a user