fix(ui): integrate responsive interface scale (#3423)
Keep normal web headers at 48px, send native zoom directly to the focused main or Mini Chat window, and restore walkthrough widths through validated persisted ratios. Validated 40 context-panel tests, the focus-aware ThemeProvider regression, UI type-check and Electron syntax checks. Runtime smoke and combined workspace validation follow before publication.
This commit is contained in:
@@ -2308,6 +2308,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:zoom', action);
|
||||
return;
|
||||
}
|
||||
emitToWindow(target, 'openchamber:menu-action', action);
|
||||
dispatchDomEventToWindow(target, 'openchamber:menu-action', action);
|
||||
};
|
||||
@@ -4864,6 +4871,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' },
|
||||
],
|
||||
},
|
||||
@@ -4977,6 +4988,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' },
|
||||
|
||||
Reference in New Issue
Block a user