diff options
-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; |