Allow menus to abut the left and top edges of the screen. Bug 176767, patch by

Martijn Wargers <martijn.martijn@gmail.com>, r+sr=roc, a=asa
This commit is contained in:
bzbarsky%mit.edu 2005-06-09 15:35:31 +00:00
Родитель 0d78939490
Коммит 8c7d6880ec
1 изменённых файлов: 4 добавлений и 9 удалений

Просмотреть файл

@ -861,18 +861,13 @@ nsMenuPopupFrame::SyncViewWithFrame(nsPresContext* aPresContext,
screen->GetAvailWidth(&screenWidth);
screen->GetAvailHeight(&screenHeight);
}
// keep 3px margin to the right and bottom of the screen for WinXP dropshadow
screenWidth -= 3;
screenHeight -= 3;
screenRight = screenLeft + screenWidth;
screenBottom = screenTop + screenHeight;
// inset the screen by 5px so that menus don't butt up against the side
const PRInt32 kTrimMargin = 5;
screenLeft += kTrimMargin;
screenTop += kTrimMargin;
screenRight -= kTrimMargin;
screenBottom -= kTrimMargin;
screenWidth -= 2 * kTrimMargin;
screenHeight -= 2 * kTrimMargin;
PRInt32 screenTopTwips = NSIntPixelsToTwips(screenTop, p2t);
PRInt32 screenLeftTwips = NSIntPixelsToTwips(screenLeft, p2t);
PRInt32 screenWidthTwips = NSIntPixelsToTwips(screenWidth, p2t);