use a constant

This commit is contained in:
pinkerton%netscape.com 2002-08-08 19:40:40 +00:00
parent 55477057ee
commit 5d4cc7c30c
4 changed files with 16 additions and 12 deletions

View File

@ -108,10 +108,11 @@
// top left corner somewhere below that, but not if that'll put it off the monitor. There
// is no way that we can go off the top of the monitor because cocoa won't let us position a window
// that way
if ( point.y - 20 - textSize.height > NSMinY(screenFrame) )
point.y -= 20;
const int kVOffset = 20;
if ( point.y - kVOffset - textSize.height > NSMinY(screenFrame) )
point.y -= kVOffset;
else
point.y += 20;
point.y += kVOffset;
[mPanel setFrameTopLeftPoint: point];
// if it goes off the edge of the screen, shift around to put it all on the screen

View File

@ -108,10 +108,11 @@
// top left corner somewhere below that, but not if that'll put it off the monitor. There
// is no way that we can go off the top of the monitor because cocoa won't let us position a window
// that way
if ( point.y - 20 - textSize.height > NSMinY(screenFrame) )
point.y -= 20;
const int kVOffset = 20;
if ( point.y - kVOffset - textSize.height > NSMinY(screenFrame) )
point.y -= kVOffset;
else
point.y += 20;
point.y += kVOffset;
[mPanel setFrameTopLeftPoint: point];
// if it goes off the edge of the screen, shift around to put it all on the screen

View File

@ -108,10 +108,11 @@
// top left corner somewhere below that, but not if that'll put it off the monitor. There
// is no way that we can go off the top of the monitor because cocoa won't let us position a window
// that way
if ( point.y - 20 - textSize.height > NSMinY(screenFrame) )
point.y -= 20;
const int kVOffset = 20;
if ( point.y - kVOffset - textSize.height > NSMinY(screenFrame) )
point.y -= kVOffset;
else
point.y += 20;
point.y += kVOffset;
[mPanel setFrameTopLeftPoint: point];
// if it goes off the edge of the screen, shift around to put it all on the screen

View File

@ -108,10 +108,11 @@
// top left corner somewhere below that, but not if that'll put it off the monitor. There
// is no way that we can go off the top of the monitor because cocoa won't let us position a window
// that way
if ( point.y - 20 - textSize.height > NSMinY(screenFrame) )
point.y -= 20;
const int kVOffset = 20;
if ( point.y - kVOffset - textSize.height > NSMinY(screenFrame) )
point.y -= kVOffset;
else
point.y += 20;
point.y += kVOffset;
[mPanel setFrameTopLeftPoint: point];
// if it goes off the edge of the screen, shift around to put it all on the screen