fix(ui): keep layout responsive at every interface scale

This commit is contained in:
khafaji-ahmed
2026-09-08 19:56:49 -04:00
parent 05915e2859
commit e12a0ebd64
21 changed files with 197 additions and 35 deletions
+14
View File
@@ -2413,6 +2413,13 @@ const getMenuTargetWindow = () => {
const dispatchMenuAction = (action) => {
const target = getMenuTargetWindow();
// Zoom actions are consumed by the renderer's DOM listener. Sending them
// through both the IPC bridge and the DOM event would invoke the handler
// multiple times because preload fans the IPC event back into both paths.
if (action === 'zoom-in' || action === 'zoom-out' || action === 'zoom-reset') {
dispatchDomEventToWindow(target, 'openchamber:menu-action', action);
return;
}
emitToWindow(target, 'openchamber:menu-action', action);
dispatchDomEventToWindow(target, 'openchamber:menu-action', action);
};
@@ -4963,6 +4970,10 @@ const buildMacMenu = () => {
{ role: 'minimize' },
{ role: 'zoom' },
{ type: 'separator' },
{ label: 'Zoom In', accelerator: 'CmdOrCtrl+=', click: () => dispatchAction('zoom-in') },
{ label: 'Zoom Out', accelerator: 'CmdOrCtrl+-', click: () => dispatchAction('zoom-out') },
{ label: 'Reset Zoom', accelerator: 'CmdOrCtrl+0', click: () => dispatchAction('zoom-reset') },
{ type: 'separator' },
{ role: 'close' },
],
},
@@ -5076,6 +5087,9 @@ const buildAutoHiddenMenu = () => {
label: 'Window',
submenu: [
{ role: 'minimize' },
{ label: 'Zoom In', accelerator: 'Ctrl+=', click: () => dispatchAction('zoom-in') },
{ label: 'Zoom Out', accelerator: 'Ctrl+-', click: () => dispatchAction('zoom-out') },
{ label: 'Reset Zoom', accelerator: 'Ctrl+0', click: () => dispatchAction('zoom-reset') },
{ role: 'togglefullscreen' },
{ type: 'separator' },
{ role: 'close' },