Fixed window positioning routine to keep window title visible.

This commit is contained in:
Robert Greene 2004-06-10 12:11:09 +00:00
parent 8464a53119
commit 89877c161e
2 changed files with 3 additions and 0 deletions

1
TODO
View File

@ -19,6 +19,7 @@ This is the internal list of items that need to be done.
formats (Orca, APW, etc).
* File viewer window now scrolls an appropriate amount: PgUp/PgDn, arrows,
mousewheel all work (must select content area first of course).
* Wizard windows no longer show up with the title bar off the screen.
--- FUTURE 1.3.x ---
o Create reusable show dialog messages (they're scattered all over right now) to clean

View File

@ -40,6 +40,8 @@ public class SwtUtil {
(parent.getSize().x - child.getSize().x) / 2;
int y = parent.getLocation().y +
(parent.getSize().y - child.getSize().y) / 2;
if (x < 0) x = 0;
if (y < 0) y = 0;
child.setLocation(x,y);
}