Просмотр исходного кода

feat(desktop): auto-hide menu bar on Linux and Windows (#27618)

Luna Seemann 3 месяцев назад
Родитель
Сommit
73cdba959b
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      packages/desktop/src/main/windows.ts

+ 2 - 0
packages/desktop/src/main/windows.ts

@@ -84,6 +84,7 @@ export function createMainWindow() {
     width: state.width,
     width: state.width,
     height: state.height,
     height: state.height,
     show: false,
     show: false,
+    autoHideMenuBar: true,
     title: "OpenCode",
     title: "OpenCode",
     icon: iconPath(),
     icon: iconPath(),
     backgroundColor,
     backgroundColor,
@@ -142,6 +143,7 @@ export function createLoadingWindow() {
     resizable: false,
     resizable: false,
     center: true,
     center: true,
     show: true,
     show: true,
+    autoHideMenuBar: true,
     icon: iconPath(),
     icon: iconPath(),
     backgroundColor,
     backgroundColor,
     ...(process.platform === "darwin" ? { titleBarStyle: "hidden" as const } : {}),
     ...(process.platform === "darwin" ? { titleBarStyle: "hidden" as const } : {}),