Skip to content

Commit

Permalink
just use not mac actually is enough
Browse files Browse the repository at this point in the history
  • Loading branch information
Weihua Lu authored and tiensonqin committed Mar 11, 2021
1 parent d98fb1a commit 0a6310f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/electron/electron/core.cljs
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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
Expand All @@ -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))
Expand Down
1 change: 0 additions & 1 deletion src/electron/electron/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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?))
Expand Down

0 comments on commit 0a6310f

Please sign in to comment.