Bug507640 - account manager is a bit too high to fit screen 800px screens with Unity desktop. r=iann a=jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Mon, 16 May 2016 10:21:25 +0300
changeset 27244 9b737b9aeb8114a01c7a9cc1aa5e9578bd912e94
parent 27243 4f9859a0da24d6b8d1df8de4fa415f29ec95e877
child 27245 d4bd6be465f5f1758b68ea3890dbddf91fd2c990
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersiann, jorgk
bugs507640
Bug507640 - account manager is a bit too high to fit screen 800px screens with Unity desktop. r=iann a=jorgk
mailnews/base/prefs/content/AccountManager.js
mailnews/base/prefs/content/AccountManager.xul
--- a/mailnews/base/prefs/content/AccountManager.js
+++ b/mailnews/base/prefs/content/AccountManager.js
@@ -146,16 +146,20 @@ function onLoad() {
   }
 
   accountArray = new Object();
   gGenericAttributeTypes = new Object();
 
   gAccountTree.load();
 
   setTimeout(selectServer, 0, selectedServer, selectPage);
+
+  // Make sure the account manager window fits the screen.
+  document.getElementById("accountManager").style.maxHeight =
+    (window.screen.availHeight - 30) + "px";
 }
 
 function onUnload() {
   gAccountTree.unload();
 }
 
 function selectServer(server, selectPageId)
 {
--- a/mailnews/base/prefs/content/AccountManager.xul
+++ b/mailnews/base/prefs/content/AccountManager.xul
@@ -1,18 +1,17 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-
 <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
 
-<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/AccountManager.dtd" >
-<dialog id="accountManager" 
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/AccountManager.dtd">
+<dialog id="accountManager"
         windowtype="mailnews:accountmanager"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&accountManagerTitle.label;"
         style="&accountManager.size;"
         persist="screenX screenY"
         buttons="accept,cancel"
         onload="onLoad(event);"
         onunload="onUnload();"