(waveWindow: WaveWindow, fullConfig: FullConfigType, opts: WindowOpts)
| 154 | private actionQueue: WindowActionQueueEntry[]; |
| 155 | |
| 156 | constructor(waveWindow: WaveWindow, fullConfig: FullConfigType, opts: WindowOpts) { |
| 157 | const settings = fullConfig?.settings; |
| 158 | |
| 159 | console.log("create win", waveWindow.oid); |
| 160 | const winBounds = calculateWindowBounds(waveWindow.winsize, waveWindow.pos, settings); |
| 161 | const winOpts: BaseWindowConstructorOptions = { |
| 162 | x: winBounds.x, |
| 163 | y: winBounds.y, |
| 164 | width: winBounds.width, |
| 165 | height: winBounds.height, |
| 166 | minWidth: MinWindowWidth, |
| 167 | minHeight: MinWindowHeight, |
| 168 | show: false, |
| 169 | }; |
| 170 | |
| 171 | const isTransparent = settings?.["window:transparent"] ?? false; |
| 172 | const isBlur = !isTransparent && (settings?.["window:blur"] ?? false); |
| 173 | |
| 174 | if (opts.unamePlatform === "darwin") { |
| 175 | winOpts.titleBarStyle = "hiddenInset"; |
| 176 | winOpts.titleBarOverlay = false; |
| 177 | winOpts.autoHideMenuBar = !settings?.["window:showmenubar"]; |
| 178 | winOpts.acceptFirstMouse = true; |
| 179 | if (isTransparent) { |
| 180 | winOpts.transparent = true; |
| 181 | } else if (isBlur) { |
| 182 | winOpts.vibrancy = "fullscreen-ui"; |
| 183 | } else { |
| 184 | winOpts.backgroundColor = "#222222"; |
| 185 | } |
| 186 | } else if (opts.unamePlatform === "linux") { |
| 187 | winOpts.titleBarStyle = settings["window:nativetitlebar"] ? "default" : "hidden"; |
| 188 | winOpts.titleBarOverlay = { |
| 189 | symbolColor: "white", |
| 190 | color: "#00000000", |
| 191 | }; |
| 192 | winOpts.icon = path.join(getElectronAppBasePath(), "public/logos/wave-logo-dark.png"); |
| 193 | winOpts.autoHideMenuBar = !settings?.["window:showmenubar"]; |
| 194 | if (isTransparent) { |
| 195 | winOpts.transparent = true; |
| 196 | } else { |
| 197 | winOpts.backgroundColor = "#222222"; |
| 198 | } |
| 199 | } else if (opts.unamePlatform === "win32") { |
| 200 | winOpts.titleBarStyle = "hidden"; |
| 201 | winOpts.titleBarOverlay = { |
| 202 | color: "#222222", |
| 203 | symbolColor: "#c3c8c2", |
| 204 | height: 32, |
| 205 | }; |
| 206 | if (isTransparent) { |
| 207 | winOpts.transparent = true; |
| 208 | } else if (isBlur) { |
| 209 | winOpts.backgroundMaterial = "acrylic"; |
| 210 | } else { |
| 211 | winOpts.backgroundColor = "#222222"; |
| 212 | } |
| 213 | } |
nothing calls this directly
no test coverage detected