mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 18:12:22 +00:00
eclipse plugin: add centering for new wizard dialogs
This commit is contained in:
parent
b869102949
commit
4b49bf900f
@ -36,8 +36,10 @@ public class WizardUtils
|
||||
|
||||
WizardDialog wizardDialog = new WizardDialog(shell, wizard);
|
||||
wizardDialog.create();
|
||||
//TODO: center wizard?
|
||||
wizardDialog.getShell().setLocation(shell.getBounds().x, shell.getBounds().y);
|
||||
int x = shell.getBounds().x, y = shell.getBounds().y;
|
||||
x += ((shell.getBounds().width - wizardDialog.getShell().getBounds().width)/2);
|
||||
y += ((shell.getBounds().height - wizardDialog.getShell().getBounds().height)/2);
|
||||
wizardDialog.getShell().setLocation(x, y);
|
||||
Activator.getDefault().getWorkbench().getHelpSystem().setHelp(wizardDialog.getShell(),
|
||||
"org.eclipse.ui.new_wizard_context");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user