summaryrefslogtreecommitdiff
path: root/src/gui/windows/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-15 01:00:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-15 01:00:28 +0300
commit84e2a85c11eadd62572539d429c1de1d67223fae (patch)
tree8e37f6542277cc8451059796365223bf6add808b /src/gui/windows/logindialog.cpp
parent6e8c126facec2cec5abd06ba765663049c725af2 (diff)
downloadManaVerse-84e2a85c11eadd62572539d429c1de1d67223fae.tar.gz
ManaVerse-84e2a85c11eadd62572539d429c1de1d67223fae.tar.bz2
ManaVerse-84e2a85c11eadd62572539d429c1de1d67223fae.tar.xz
ManaVerse-84e2a85c11eadd62572539d429c1de1d67223fae.zip
On Android move login dialog to top border.
Diffstat (limited to 'src/gui/windows/logindialog.cpp')
-rw-r--r--src/gui/windows/logindialog.cpp21
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