We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { width, height } = screen.getPrimaryDisplay().workAreaSize; const barHeight = screen.getPrimaryDisplay().workArea.y; const newWidth = Math.round(width * (4 / 5)); const newHeight = Math.round(newWidth * (9 / 16)) + barHeight; const x = Math.round((width - newWidth) / 2); const y = Math.round((height - newHeight) / 2);
The text was updated successfully, but these errors were encountered:
可以在生命周期,或者预加载模块处理。
配置里面隐藏主窗口。在electron/index.js 或 preload/index.js里面拿到主窗口对象,调整尺寸,然后显示窗口
Sorry, something went wrong.
No branches or pull requests
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
const barHeight = screen.getPrimaryDisplay().workArea.y;
const newWidth = Math.round(width * (4 / 5));
const newHeight = Math.round(newWidth * (9 / 16)) + barHeight;
const x = Math.round((width - newWidth) / 2);
const y = Math.round((height - newHeight) / 2);
The text was updated successfully, but these errors were encountered: