зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
0d78939490
Коммит
8c7d6880ec
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче