1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-03 12:15:46 +01:00

Fix the MOW height calculation in Muttator.

This commit is contained in:
Doug Kearns
2009-06-12 01:03:33 +10:00
parent 9a0076b109
commit 30a54a4271
3 changed files with 27 additions and 3 deletions

View File

@@ -104,6 +104,12 @@ const configbase = { //{{{
*/ */
name: null, name: null,
/**
* @property {number} The height (px) that is available to the output
* window.
*/
get outputHeight() getBrowser().mPanelContainer.boxObject.height,
/** /**
* @property {[string]} A list of extra scripts in the liberator or * @property {[string]} A list of extra scripts in the liberator or
* application namespaces which should be loaded before liberator * application namespaces which should be loaded before liberator

View File

@@ -1681,11 +1681,10 @@ function CommandLine() //{{{
let doc = multilineOutputWidget.contentDocument; let doc = multilineOutputWidget.contentDocument;
let availableHeight = 250; let availableHeight = 250; // Why? --djk
try try
{ {
availableHeight = getBrowser().mPanelContainer ? availableHeight = config.outputHeight;
getBrowser().mPanelContainer.boxObject.height : getBrowser().boxObject.height;
if (!outputContainer.collapsed) if (!outputContainer.collapsed)
availableHeight += parseFloat(outputContainer.height); availableHeight += parseFloat(outputContainer.height);
} }

View File

@@ -142,6 +142,25 @@ const config = { //{{{
["COMPOSE"] ["COMPOSE"]
], ],
// NOTE: as I don't use TB I have no idea how robust this is. --djk
get outputHeight()
{
if (!this.isComposeWindow)
{
let container = document.getElementById("tabpanelcontainer").boxObject;
let deck = document.getElementById("displayDeck");
let box = document.getElementById("messagepanebox");
let splitter = document.getElementById("threadpane-splitter").boxObject;
if (splitter.width > splitter.height)
return container.height - deck.minHeight - box.minHeight- splitter.height;
else
return container.height - Math.max(deck.minHeight, box.minHeight);
}
else
return document.getElementById("appcontent").boxObject.height;
},
scripts: [ scripts: [
"addressbook.js", "addressbook.js",
"mail.js", "mail.js",