mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug #240750 --> Use sane widths and heights for all resolutions, not just 800 x 600 when launching with a new profile.
This commit is contained in:
parent
441c5f95a5
commit
132c9e939a
@ -35,11 +35,5 @@
|
||||
<NC:persist resource="chrome://messenger/content/messenger.xul#messengerWindow"/>
|
||||
<NC:persist resource="chrome://messenger/content/messenger.xul#threadOutliner"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description about="chrome://messenger/content/messenger.xul#messengerWindow">
|
||||
<screenX>4</screenX>
|
||||
<screenY>4</screenY>
|
||||
<width>800</width>
|
||||
<height>565</height>
|
||||
</RDF:Description>
|
||||
<RDF:Description about="chrome://messenger/content/messenger.xul#threadOutliner" height="94" />
|
||||
</RDF:RDF>
|
||||
|
@ -42,8 +42,6 @@
|
||||
titlemenuseparator="&titleSeparator.label;"
|
||||
onload="OnLoadMessenger()"
|
||||
onunload="OnUnloadMessenger()"
|
||||
width="750"
|
||||
height="500"
|
||||
screenX="10" screenY="10"
|
||||
persist="width height screenX screenY sizemode"
|
||||
windowtype="mail:3pane">
|
||||
|
@ -721,6 +721,27 @@ function OnLoadMessenger()
|
||||
// in delayedOnLoadMessenger...
|
||||
UpdateMailPaneConfig(false);
|
||||
|
||||
// Set a sane starting width/height for all resolutions on new profiles. Do this before the window loads
|
||||
if (!document.documentElement.hasAttribute("width"))
|
||||
{
|
||||
var defaultWidth, defaultHeight;
|
||||
if (screen.availHeight <= 600)
|
||||
{
|
||||
document.documentElement.setAttribute("sizemode", "maximized");
|
||||
defaultWidth = 800;
|
||||
defaultHeight = 565;
|
||||
}
|
||||
else // for higher resolution displays, use larger values for height and width
|
||||
{
|
||||
defaultWidth = screen.availWidth * .8;
|
||||
defaultHeight = screen.availHeight * .8;
|
||||
}
|
||||
|
||||
document.documentElement.setAttribute("width", defaultWidth);
|
||||
document.documentElement.setAttribute("height", defaultHeight);
|
||||
}
|
||||
|
||||
|
||||
setTimeout(delayedOnLoadMessenger, 0); // when debugging, set this to 5000, so you can see what happens after the window comes up.
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user