Center welcome window using moveTo for improved positioning

This commit is contained in:
mr. M
2025-02-21 12:36:44 +01:00
parent a97ff24035
commit 1b97e5bc97

View File

@@ -524,7 +524,10 @@
window.focus();
const appWin = window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow);
appWin.rollupAllPopups();
appWin.center(null, true, false);
window.moveTo(
screen.availLeft + (screen.availWidth - outerWidth) / 2,
screen.availTop + (screen.availHeight - outerHeight) / 2
);
},
{ once: true }
);