From fd22e571b1a1e3d9853d9235b302f4653929a279 Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Sun, 7 Aug 2005 08:23:20 +0000 Subject: [PATCH] fix about window positioning on Macs. b=295282 r=mano sr=mconnor a=mconnor --- browser/base/content/aboutDialog.js | 5 +++++ browser/base/content/utilityOverlay.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js index 6033d96122ba..aa0278f22ee6 100644 --- a/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js @@ -48,6 +48,11 @@ function init(aEvent) button.addEventListener("command", switchPage, false); document.documentElement.getButton("accept").focus(); +#ifdef XP_MACOSX + // it may not be sized at this point, and we need its width to calculate its position + window.sizeToContent(); + window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5); +#endif } function uninit(aEvent) diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 5f36caed427a..e210793f3be4 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -406,7 +406,7 @@ function openAboutDialog() // XXXmano: define minimizable=no although it does nothing on OS X // (see Bug 287162); remove this comment once Bug 287162 is fixed... window.open("chrome://browser/content/aboutDialog.xul", "About", - "centerscreen,chrome,resizable=no, minimizable=no"); + "chrome, resizable=no, minimizable=no"); } #else window.openDialog("chrome://browser/content/aboutDialog.xul", "About", "modal,centerscreen,chrome,resizable=no");