An open sidebar panel (a web app or an extension panel) now has a bar on top with its name, Maximize/Restore (it covers the page, up to the right sidebar) and Close. How panels sit next to the page is a choice, in the new gear above + on the strip and in Settings > Sidebar: over the page, where it floats on the left of a page that keeps its width and a click in the page closes it; or pushing the page aside, where it stays open until closed. That choice replaces the pin, which only existed to keep a panel open on a page click. Also: a window laid out while minimized reads a zero-size area, so every view was left at 0x0 and the window came back blank until resized. Layout now skips a minimized window and runs again on restore.
8 lines
441 B
JavaScript
8 lines
441 B
JavaScript
// Preload for panel-header.html, the bar over an open sidebar panel.
|
|
const { contextBridge, ipcRenderer } = require("electron");
|
|
contextBridge.exposeInMainWorld("panelHeader", {
|
|
getState: () => ipcRenderer.invoke("panel-header-state"),
|
|
toggleMax: () => ipcRenderer.invoke("panel-header-max"),
|
|
close: () => ipcRenderer.invoke("panel-header-close"),
|
|
onState: (cb) => ipcRenderer.on("panel-header-state", (_e, s) => cb(s)),
|
|
});
|