diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/charselectdialog.cpp | 11 | ||||
-rw-r--r-- | src/gui/widgets/characterdisplay.cpp | 5 |
2 files changed, 12 insertions, 4 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 { diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp index bff28b374..23a22fbbb 100644 --- a/src/gui/widgets/characterdisplay.cpp +++ b/src/gui/widgets/characterdisplay.cpp @@ -50,7 +50,10 @@ CharacterDisplay::CharacterDisplay(const Widget2 *const widget, mName->setAlignment(Graphics::CENTER); mName->adjustSize(); - setWidth(80); + if (mainGraphics->getWidth() > 800) + setWidth(120); + else + setWidth(80); setHeight(120); } |