diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-15 01:00:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-15 01:00:28 +0300 |
commit | 84e2a85c11eadd62572539d429c1de1d67223fae (patch) | |
tree | 8e37f6542277cc8451059796365223bf6add808b /src/gui | |
parent | 6e8c126facec2cec5abd06ba765663049c725af2 (diff) | |
download | manaplus-84e2a85c11eadd62572539d429c1de1d67223fae.tar.gz manaplus-84e2a85c11eadd62572539d429c1de1d67223fae.tar.bz2 manaplus-84e2a85c11eadd62572539d429c1de1d67223fae.tar.xz manaplus-84e2a85c11eadd62572539d429c1de1d67223fae.zip |
On Android move login dialog to top border.
Diffstat (limited to 'src/gui')
-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 |