Bug 310900: Avoid 1-pixel gap caused by sizeToContent() in alerts service code, patch by Jens Bannmann <jens.b@web.de>, r=mscott for toolkit part, r+sr=neil for xpfe

This commit is contained in:
gavin%gavinsharp.com 2006-04-09 21:16:20 +00:00
parent 28977a8df1
commit 6670dd2a7d
2 changed files with 8 additions and 1 deletions

View File

@ -83,8 +83,14 @@ function onAlertLoad()
sizeToContent();
// work around a bug where sizeToContent() leaves a border outside of the content
var contentDim = document.getElementById("alertBox").boxObject;
if (window.innerWidth == contentDim.width + 1)
--window.innerWidth;
gFinalHeight = window.outerHeight;
// start with a 1px height, because 0 causes trouble with gtk1/2
window.outerHeight = 1;
// be sure to offset the alert by 10 pixels from the far right edge of the screen

View File

@ -85,7 +85,8 @@ function onAlertLoad()
// work around a bug where sizeToContent() leaves a border outside of the content
var contentDim = document.getElementById("alertBox").boxObject;
window.resizeTo(contentDim.width, contentDim.height);
if (window.innerWidth == contentDim.width + 1)
--window.innerWidth;
gFinalHeight = window.outerHeight;