fix about window positioning on Macs. b=295282 r=mano sr=mconnor a=mconnor

This commit is contained in:
joshmoz%gmail.com 2005-08-07 08:23:20 +00:00
parent d635277de3
commit fd22e571b1
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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");