Przeglądaj źródła

just use not mac actually is enough

Weihua Lu 4 lat temu
rodzic
commit
0a6310f86d

+ 3 - 4
src/electron/electron/core.cljs

@@ -1,7 +1,7 @@
 (ns electron.core
   (:require [electron.handler :as handler]
             [electron.updater :refer [init-updater]]
-            [electron.utils :refer [mac? linux? win32? prod? dev? logger open]]
+            [electron.utils :refer [mac? win32? prod? dev? logger open]]
             [clojure.string :as string]
             ["fs" :as fs]
             ["path" :as path]
@@ -23,8 +23,8 @@
   []
   (let [win-opts {:width         980
                   :height        700
-                  :frame         (or win32? linux?)
-                  :autoHideMenuBar win32?
+                  :frame         (not mac?)
+                  :autoHideMenuBar (not mac?)
                   :titleBarStyle (if mac? "hidden" nil)
                   :webPreferences
                   {:nodeIntegration         false
@@ -34,7 +34,6 @@
                    :preload                 (path/join js/__dirname "js/preload.js")}}
         url MAIN_WINDOW_ENTRY
         win (BrowserWindow. (clj->js win-opts))]
-    (when linux?  (.removeMenu win))
     (.loadURL win url)
     (when dev? (.. win -webContents (openDevTools)))
     win))

+ 0 - 1
src/electron/electron/utils.cljs

@@ -2,7 +2,6 @@
 
 (defonce mac? (= (.-platform js/process) "darwin"))
 (defonce win32? (= (.-platform js/process) "win32"))
-(defonce linux? (= (.-platform js/process) "linux"))
 
 (defonce prod? (= js/process.env.NODE_ENV "production"))
 (defonce dev? (not prod?))