插件适配窗口缩放;修复窗口尺寸调整的bug;新增 createBrowserWindow、getCursorScreenPoint、getDisplayNearestPoint、outPlugin API

This commit is contained in:
muwoo
2023-10-23 15:30:15 +08:00
parent c00963fabb
commit 6da9e2fe9c
13 changed files with 83 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ export default () => {
const height = pluginSetting && pluginSetting.height;
window.setSize(800, height || 600);
view.setBounds({ x: 0, y: 60, width: 800, height: height || 540 });
view.setAutoResize({ width: true });
view.setAutoResize({ width: true, height: true });
executeHooks('PluginEnter', ext);
executeHooks('PluginReady', ext);
const config = await localConfig.getConfig();
@@ -166,7 +166,7 @@ export default () => {
const removeView = (window: BrowserWindow) => {
if (!view) return;
window.removeBrowserView(view);
window.setSize(800, 60);
// window.setSize(800, 60);
executeHooks('PluginOut', null);
window.webContents?.executeJavaScript(`window.initRubick()`);
view = undefined;