diff --git a/common/content/configbase.js b/common/content/configbase.js index a519079a..711d07b9 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -104,6 +104,12 @@ const configbase = { //{{{ */ 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 * application namespaces which should be loaded before liberator diff --git a/common/content/ui.js b/common/content/ui.js index 99f9ebc9..ddf27a17 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1681,11 +1681,10 @@ function CommandLine() //{{{ let doc = multilineOutputWidget.contentDocument; - let availableHeight = 250; + let availableHeight = 250; // Why? --djk try { - availableHeight = getBrowser().mPanelContainer ? - getBrowser().mPanelContainer.boxObject.height : getBrowser().boxObject.height; + availableHeight = config.outputHeight; if (!outputContainer.collapsed) availableHeight += parseFloat(outputContainer.height); } diff --git a/muttator/content/config.js b/muttator/content/config.js index 2930cc3e..f893497a 100644 --- a/muttator/content/config.js +++ b/muttator/content/config.js @@ -142,6 +142,25 @@ const config = { //{{{ ["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: [ "addressbook.js", "mail.js",