From 9539093c42bc459aaa1a1053d0e31b03d0839824 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 May 2013 19:10:52 +0300 Subject: adjust char selection dialog for small screens. --- src/gui/charselectdialog.cpp | 5 ++--- src/gui/widgets/characterviewnormal.cpp | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 9b96c77c0..04691bbdc 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -109,8 +109,8 @@ CharSelectDialog::CharSelectDialog(LoginData *const data): mCharServerHandler(Net::getCharServerHandler()), mDeleteDialog(nullptr), mDeleteIndex(-1), - mSmallScreen(mainGraphics->getWidth() < 485 - || mainGraphics->getHeight() < 485) + mSmallScreen(mainGraphics->getWidth() < 470 + || mainGraphics->getHeight() < 370) { setCloseButton(true); setFocusable(true); @@ -181,7 +181,6 @@ CharSelectDialog::CharSelectDialog(LoginData *const data): placer(0, 1, mCharacterView, 10); reflowLayout(); } - addKeyListener(this); center(); setVisible(true); diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp index f197ea343..11b630099 100644 --- a/src/gui/widgets/characterviewnormal.cpp +++ b/src/gui/widgets/characterviewnormal.cpp @@ -48,10 +48,7 @@ CharacterViewNormal::CharacterViewNormal(CharSelectDialog *const widget, } const CharacterDisplay *const firtChar = (*mCharacterEntries)[0]; setWidth(firtChar->getWidth() * 5 + mPadding * 2); - if (config.getIntValue("fontSize") > 16) - setHeight(250); - else - setHeight(220); + setHeight(210 + config.getIntValue("fontSize") * 2); } CharacterViewNormal::~CharacterViewNormal() -- cgit v1.2.3-70-g09d2