Reputation: 8978
After calling
remote.getCurrentWindow().setSize(width, height);
the window resizes, but is not positioned in the center of the screen. Is there a way to adjust the offset of the window relative to the screen?
Upvotes: 6
Views: 7469
Reputation: 8978
There is a .center()
method on BrowserWindow
, so
const win = remote.getCurrentWindow();
win.setSize(width, height);
win.center();
centers the window after resizing.
Upvotes: 22