From 6ef15759c7e598f4d0c49a262562c9135fab0e5e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Dec 2013 22:34:04 +0300 Subject: fix bot checker window in some themes. --- src/gui/windows/botcheckerwindow.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp index 74dd38ddd..57c3c3712 100644 --- a/src/gui/windows/botcheckerwindow.cpp +++ b/src/gui/windows/botcheckerwindow.cpp @@ -316,18 +316,23 @@ BotCheckerWindow::BotCheckerWindow(): setDefaultSize(w, h, ImageRect::CENTER); playersScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER); + mIncButton->adjustSize(); - mPlayerTitleTable->setPosition(mPadding, mPadding); - mPlayerTitleTable->setWidth(w - 10); + const int pad4 = mPadding * 4; + int y = mPadding; + mPlayerTitleTable->setPosition(mPadding, y); + mPlayerTitleTable->setWidth(w - pad4); mPlayerTitleTable->setHeight(20); - playersScrollArea->setPosition(mPadding, 20 + 2 * mPadding); - playersScrollArea->setWidth(w - 15); - playersScrollArea->setHeight(h - 80); + y += 20 + mPadding; + playersScrollArea->setPosition(mPadding, y); + playersScrollArea->setWidth(w - pad4); + const int scrollHeight = h - y - mTitleBarHeight - mPadding * 3 + - mIncButton->getHeight(); + playersScrollArea->setHeight(scrollHeight); + y += scrollHeight + mPadding; - mIncButton->setPosition(mPadding, 190 + 3 * mPadding); - mIncButton->setWidth(80); - mIncButton->setHeight(20); + mIncButton->setPosition(mPadding, y); add(mPlayerTitleTable); add(playersScrollArea); -- cgit v1.2.3-70-g09d2