diff --git a/toolkit/content/customizeToolbar.js b/toolkit/content/customizeToolbar.js index 23cb255c1c2..2a51b7745c0 100644 --- a/toolkit/content/customizeToolbar.js +++ b/toolkit/content/customizeToolbar.js @@ -39,11 +39,6 @@ # ***** END LICENSE BLOCK ***** const kRowMax = 4; -const kWindowWidth = 635; -const kWindowHeight = 400; -const kAnimateIncrement = 50; -const kAnimateSteps = kWindowHeight / kAnimateIncrement - 1; -const kVSizeSlop = 5; var gToolboxDocument = null; var gToolbox = null; @@ -104,17 +99,12 @@ function initDialog() function repositionDialog() { // Position the dialog touching the bottom of the toolbox and centered with - // it. We must resize the window smaller first so that it is positioned - // properly. - var screenX = gToolbox.boxObject.screenX + ((gToolbox.boxObject.width - kWindowWidth) / 2); + // it. + var screenX = gToolbox.boxObject.screenX + + ((gToolbox.boxObject.width + - parseInt(document.documentElement.style.width)) / 2); var screenY = gToolbox.boxObject.screenY + gToolbox.boxObject.height; - var newHeight = kWindowHeight; - if (newHeight >= screen.availHeight - screenY - kVSizeSlop) { - newHeight = screen.availHeight - screenY - kVSizeSlop; - } - - window.resizeTo(kWindowWidth, newHeight); window.moveTo(screenX, screenY); } @@ -561,7 +551,6 @@ function addNewToolbar() gToolbox.appendCustomToolbar(name.value, ""); - repositionDialog(); gToolboxChanged = true; } @@ -615,7 +604,6 @@ function restoreDefaultSet() // Restore the disabled and command states restoreItemAttributes(["itemdisabled", "itemcommand"], savedAttributes); - repositionDialog(); gToolboxChanged = true; } @@ -670,8 +658,6 @@ function updateIconSize(aUseSmallIcons) gToolboxDocument.persist(toolbar.id, "iconsize"); } } - - repositionDialog(); } function updateToolbarMode(aModeValue) @@ -689,8 +675,6 @@ function updateToolbarMode(aModeValue) var iconSizeCheckbox = document.getElementById("smallicons"); iconSizeCheckbox.disabled = aModeValue == "text"; - - repositionDialog(); } @@ -922,7 +906,6 @@ var toolbarDNDObserver = gCurrentDragOverItem = null; - repositionDialog(); gToolboxChanged = true; }, @@ -979,7 +962,6 @@ var paletteDNDObserver = } } - repositionDialog(); gToolboxChanged = true; }, diff --git a/toolkit/content/customizeToolbar.xul b/toolkit/content/customizeToolbar.xul index f7caef0b3a1..306641a4797 100644 --- a/toolkit/content/customizeToolbar.xul +++ b/toolkit/content/customizeToolbar.xul @@ -54,6 +54,8 @@ onload="onLoad();" onunload="onUnload();" onclose="onAccept(); return false;" + style="&dialog.style;" + persist="width height" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">