summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-12 12:56:25 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-12 12:57:28 +0300
commitd5fc6fe1576695ab8cb9d7d2644113c02bccac73 (patch)
treeec32df195c9b7cb852ffacc78f0d1dce029cbccc
parentf45fecdc5429fbfd37a393440c2ea486b479b220 (diff)
downloadmanaplus-d5fc6fe1576695ab8cb9d7d2644113c02bccac73.tar.gz
manaplus-d5fc6fe1576695ab8cb9d7d2644113c02bccac73.tar.bz2
manaplus-d5fc6fe1576695ab8cb9d7d2644113c02bccac73.tar.xz
manaplus-d5fc6fe1576695ab8cb9d7d2644113c02bccac73.zip
Fix resize issue in who is online window in some themes.
-rw-r--r--src/gui/whoisonline.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index df2e5a47e..47189f6f5 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -122,6 +122,7 @@ WhoIsOnline::WhoIsOnline():
download();
+ widgetResized(nullptr);
config.addListener("updateOnlineList", this);
config.addListener("groupFriends", this);
mUpdateOnlineList = config.getBoolValue("updateOnlineList");
@@ -303,6 +304,7 @@ void WhoIsOnline::loadList(std::vector<OnlinePlayer*> &list)
if (socialWindow)
socialWindow->updateActiveList();
}
+ updateSize();
}
void WhoIsOnline::loadWebList()
@@ -691,15 +693,14 @@ void WhoIsOnline::widgetResized(const gcn::Event &event)
void WhoIsOnline::updateSize()
{
- if (mDownloadStatus == UPDATE_COMPLETE)
- {
- const gcn::Rectangle area = getChildrenArea();
- if (mUpdateButton)
- mUpdateButton->setWidth(area.width - 10);
-
- if (mScrollArea)
- mScrollArea->setSize(area.width - 10, area.height - 10 - 30);
- }
+ const gcn::Rectangle area = getChildrenArea();
+ if (mUpdateButton)
+ mUpdateButton->setWidth(area.width - 10);
+
+ if (mScrollArea)
+ mScrollArea->setSize(area.width - 10, area.height - 10 - 30);
+ if (mBrowserBox)
+ mBrowserBox->setWidth(area.width - 10);
}
const std::string WhoIsOnline::prepareNick(std::string nick, int level,