mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
Merge pull request #10032 from SivanCola/fix/desktop-stub-zoom-routing
fix(desktop): route stub native zoom through the command table / 桌面测试桩的原生缩放改走命令表
This commit is contained in:
1 file changed
+12
-2
@@ -79,8 +79,18 @@ export function installDesktopHostStub(commands: object, options: DesktopHostStu
|
||||
minimise: () => {},
|
||||
toggleMaximise: () => {},
|
||||
close: () => {},
|
||||
getAppZoom: async () => 1,
|
||||
setAppZoom: async () => 1,
|
||||
// The Electron shell owns zoom natively; tests drive it through the
|
||||
// same command table the bridge path uses, so tables without zoom
|
||||
// commands keep the neutral default.
|
||||
getAppZoom: async () => {
|
||||
const fn = ref.current.GetDesktopZoomFactor as (() => Promise<number>) | undefined;
|
||||
return typeof fn === "function" ? await fn() : 1;
|
||||
},
|
||||
setAppZoom: async (factor: number) => {
|
||||
const fn = ref.current.SetDesktopZoomFactor as ((factor: number) => Promise<number>) | undefined;
|
||||
if (typeof fn === "function") await fn(factor);
|
||||
return factor;
|
||||
},
|
||||
resetAppZoom: async () => 1,
|
||||
},
|
||||
getPathForFile: options.getPathForFile ?? (() => ""),
|
||||
|
||||
Reference in new issue
Block a user