* Grow or shrink the loading window to reveal/hide the startup-log console. * Keeps the top edge fixed so the splash content doesn't jump. Invoked from * the renderer ("Show details" toggle) and from showStartupFailure().
(expanded)
| 258 | * the renderer ("Show details" toggle) and from showStartupFailure(). |
| 259 | */ |
| 260 | function setLoadingWindowExpanded(expanded) { |
| 261 | if (!loadingWin || loadingWin.isDestroyed()) return; |
| 262 | const bounds = loadingWin.getBounds(); |
| 263 | const height = expanded ? LOADING_WIN_EXPANDED_HEIGHT : LOADING_WIN_HEIGHT; |
| 264 | if (bounds.height === height) return; |
| 265 | // macOS ignores programmatic resizes of resizable:false windows on some |
| 266 | // Electron versions — lift the flag around the change. |
| 267 | loadingWin.setResizable(true); |
| 268 | loadingWin.setBounds({ ...bounds, height }, true); |
| 269 | loadingWin.setResizable(false); |
| 270 | } |
| 271 | |
| 272 | function createLoadingWindow() { |
| 273 | loadingWin = new BrowserWindow({ |
no outgoing calls
no test coverage detected