diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-19 20:39:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-19 20:39:10 +0300 |
commit | 008c5d7674f5f5ba8d0d993956628752116a1daa (patch) | |
tree | 567298678bbcc48c51cf1856c47c012f331a7572 | |
parent | 1b21f32b3b7d6e76a41bd8094af4a49a70dd83ef (diff) | |
download | manaverse-008c5d7674f5f5ba8d0d993956628752116a1daa.tar.gz manaverse-008c5d7674f5f5ba8d0d993956628752116a1daa.tar.bz2 manaverse-008c5d7674f5f5ba8d0d993956628752116a1daa.tar.xz manaverse-008c5d7674f5f5ba8d0d993956628752116a1daa.zip |
Use staticbrowserbox in whoisonline.
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 966807e58..697e3a0d5 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -41,8 +41,8 @@ #include "gui/windows/socialwindow.h" #include "gui/widgets/button.h" -#include "gui/widgets/browserbox.h" #include "gui/widgets/scrollarea.h" +#include "gui/widgets/staticbrowserbox.h" #include "being/beingflag.h" #include "being/localplayer.h" @@ -101,7 +101,7 @@ WhoIsOnline::WhoIsOnline() : mThread(nullptr), mMemoryBuffer(nullptr), mCurlError(new char[CURL_ERROR_SIZE]), - mBrowserBox(new BrowserBox(this, BrowserBoxMode::AUTO_SIZE, Opaque_true, + mBrowserBox(new StaticBrowserBox(this, Opaque_true, "onlinebrowserbox.xml")), mScrollArea(new ScrollArea(this, mBrowserBox, Opaque_false)), // TRANSLATORS: who is online. button. @@ -281,6 +281,7 @@ void WhoIsOnline::updateWindow(size_t numOnline) mScrollArea->setVerticalScrollAmount( mScrollArea->getVerticalMaxScroll()); } + mBrowserBox->updateHeight(); } void WhoIsOnline::handlerPlayerRelation(const std::string &nick, @@ -488,6 +489,7 @@ void WhoIsOnline::loadWebList() } updateWindow(numOnline); + mBrowserBox->updateHeight(); // Free the memory buffer now that we don't need it anymore free(mMemoryBuffer); diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h index 5f29971c6..9f2fdf705 100644 --- a/src/gui/windows/whoisonline.h +++ b/src/gui/windows/whoisonline.h @@ -28,10 +28,10 @@ #include "listeners/actionlistener.h" -class BrowserBox; class Button; class OnlinePlayer; class ScrollArea; +class StaticBrowserBox; /** * Update progress window GUI @@ -147,7 +147,7 @@ class WhoIsOnline final : public Window, /** Buffer to handler human readable error provided by curl. */ char *mCurlError A_NONNULLPOINTER; - BrowserBox *mBrowserBox A_NONNULLPOINTER; + StaticBrowserBox *mBrowserBox A_NONNULLPOINTER; ScrollArea *mScrollArea A_NONNULLPOINTER; Button *mUpdateButton A_NONNULLPOINTER; |