diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-12 17:54:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-12 17:54:04 +0300 |
commit | 92ddb0de073b591a3f0833406a02c063cff43002 (patch) | |
tree | 02b66d5a55126123178b1b3e764a4a3637855d93 /src/gui/charselectdialog.cpp | |
parent | d54658ddf491d4bb7daef2a901a63e6f805dcdf2 (diff) | |
download | mv-92ddb0de073b591a3f0833406a02c063cff43002.tar.gz mv-92ddb0de073b591a3f0833406a02c063cff43002.tar.bz2 mv-92ddb0de073b591a3f0833406a02c063cff43002.tar.xz mv-92ddb0de073b591a3f0833406a02c063cff43002.zip |
Set bigger size in char selection dialog if screen is big.
Diffstat (limited to 'src/gui/charselectdialog.cpp')
-rw-r--r-- | src/gui/charselectdialog.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 6ac0dd3fe..65829662d 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -164,10 +164,15 @@ CharSelectDialog::CharSelectDialog(LoginData *const data): mCharacterView = new CharacterViewNormal( this, &mCharacterEntries, mPadding); placer(0, 1, mCharacterView, 10); + int sz = 410 + 2 * mPadding; if (config.getIntValue("fontSize") > 18) - reflowLayout(500 + 2 * mPadding); - else - reflowLayout(410 + 2 * mPadding); + sz = 500 + 2 * mPadding; + const int width = mCharacterView->getWidth() + 2 * mPadding; + if (sz < width) + sz = width; + if (sz > mainGraphics->getWidth()) + sz = mainGraphics->getWidth(); + reflowLayout(sz); } else { |