diff options
-rw-r--r-- | src/gui/windows/logindialog.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 94059592b..af87605d3 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -95,6 +95,7 @@ LoginDialog::LoginDialog(LoginData *const data, mServerName(serverName) { setCloseButton(true); + setWindowName("Login"); Net::getCharServerHandler()->clear(); @@ -167,19 +168,25 @@ LoginDialog::LoginDialog(LoginData *const data, place(3, n + 3, mLoginButton); addKeyListener(this); - if (mUpdateHostLabel) - setContentSize(310, 250); - else - setContentSize(310, 200); - - reflowLayout(); - center(); } void LoginDialog::postInit() { setVisible(true); + int h = 200; + if (mUpdateHostLabel) + setContentSize(310, 250); + setContentSize(310, h); +#ifdef ANDROID + setDefaultSize(310, h, ImageRect::UPPER_CENTER, 0, 0); +#else + setDefaultSize(310, h, ImageRect::CENTER, 0, 0); +#endif + center(); + loadWindowState(); + reflowLayout(); + if (mUserField->getText().empty()) mUserField->requestFocus(); else |