summaryrefslogtreecommitdiff
path: root/src/gui/login.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-19 00:06:24 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-19 00:06:24 +0000
commit75668f13e61ef137d1835b3d60e6de9a7a9ecb42 (patch)
treef3973b20dce7f0ed61b935305056c8e8d3735670 /src/gui/login.cpp
parent55372882029946d8193ca4414091b65abd64a6ae (diff)
downloadmana-75668f13e61ef137d1835b3d60e6de9a7a9ecb42.tar.gz
mana-75668f13e61ef137d1835b3d60e6de9a7a9ecb42.tar.bz2
mana-75668f13e61ef137d1835b3d60e6de9a7a9ecb42.tar.xz
mana-75668f13e61ef137d1835b3d60e6de9a7a9ecb42.zip
Implemented setLocationRelativeTo method on Window allowing the dialogs to be
centered on screen.
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r--src/gui/login.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 511b45b6..cd74e850 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -39,7 +39,7 @@ LoginDialog::LoginDialog():
okButton = new Button("OK");
cancelButton = new Button("Cancel");
- setDimension(gcn::Rectangle(300, 250, 200, 80));
+ setSize(200, 80);
userLabel->setPosition(4, 11);
passLabel->setPosition(4, 31);
userField->setPosition(60, 10);
@@ -84,6 +84,7 @@ LoginDialog::~LoginDialog()
void LoginDialog::init()
{
+ setLocationRelativeTo(getParent());
userField->requestFocus();
userField->setCaretPosition(userField->getText().length());