diff options
author | Oleg Krasilnikov | 2007-06-14 13:42:48 +0000 |
---|---|---|
committer | Oleg Krasilnikov | 2007-06-14 13:42:48 +0000 |
commit | fe8f413c4a2e2d0be03ca230a2b73a642e745155 (patch) | |
tree | 00880be6f6747f737f77dd1d7caaf0c87634834f /core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java | |
parent | 5f0a6852c9b5a443e8af55a1618224701db53830 (diff) | |
download | org.eclipse.cdt-fe8f413c4a2e2d0be03ca230a2b73a642e745155.tar.gz org.eclipse.cdt-fe8f413c4a2e2d0be03ca230a2b73a642e745155.tar.xz org.eclipse.cdt-fe8f413c4a2e2d0be03ca230a2b73a642e745155.zip |
Bug #192187
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java')
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java index f8a8c27480f..121ca907af2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java @@ -67,13 +67,11 @@ public abstract class AbstractPropertyDialog extends Dialog { createDialogArea(shell); // center window - if (!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOCENTER)) { - Rectangle r1 = shell.getDisplay().getBounds(); - Rectangle r2 = shell.getBounds(); - int x = r1.width / 2 - r2.width / 2; - int y = r1.height / 2 - r2.height / 2; - shell.setBounds(x, y, r2.width, r2.height); - } + Rectangle r1 = parent.getBounds(); + Rectangle r2 = shell.getBounds(); + int x = r1.x + (r1.width - r2.width) / 2; + int y = r1.y + (r1.height - r2.height) / 2; + shell.setBounds(x, y, r2.width, r2.height); shell.open(); Display display = parent.getDisplay(); |