summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/didyouknowwindow.cpp5
-rw-r--r--src/gui/windows/didyouknowwindow.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index f358ece83..adaf6fe2f 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -31,11 +31,11 @@
#include "gui/windows/setupwindow.h"
#include "gui/widgets/button.h"
-#include "gui/widgets/browserbox.h"
#include "gui/widgets/checkbox.h"
#include "gui/widgets/itemlinkhandler.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/scrollarea.h"
+#include "gui/widgets/staticbrowserbox.h"
#include "utils/delete2.h"
#include "utils/gettext.h"
@@ -55,7 +55,7 @@ DidYouKnowWindow::DidYouKnowWindow() :
Window(_("Did You Know?"), Modal_false, nullptr, "didyouknow.xml"),
ActionListener(),
mItemLinkHandler(new ItemLinkHandler),
- mBrowserBox(new BrowserBox(this, BrowserBoxMode::AUTO_SIZE, Opaque_true,
+ mBrowserBox(new StaticBrowserBox(this, Opaque_true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
Opaque_true, "didyouknow_background.xml")),
@@ -160,6 +160,7 @@ void DidYouKnowWindow::loadData(int num)
loadFile(num);
+ mBrowserBox->updateHeight();
mScrollArea->setVerticalScrollAmount(0);
}
diff --git a/src/gui/windows/didyouknowwindow.h b/src/gui/windows/didyouknowwindow.h
index 68db83e67..6d5fdf1ae 100644
--- a/src/gui/windows/didyouknowwindow.h
+++ b/src/gui/windows/didyouknowwindow.h
@@ -28,10 +28,10 @@
#include "listeners/actionlistener.h"
class Button;
-class BrowserBox;
class CheckBox;
class ItemLinkHandler;
class ScrollArea;
+class StaticBrowserBox;
/**
* The help dialog.
@@ -64,7 +64,7 @@ class DidYouKnowWindow final : public Window,
void loadFile(const int num);
ItemLinkHandler *mItemLinkHandler A_NONNULLPOINTER;
- BrowserBox *mBrowserBox A_NONNULLPOINTER;
+ StaticBrowserBox *mBrowserBox A_NONNULLPOINTER;
ScrollArea *mScrollArea A_NONNULLPOINTER;
Button *mButtonPrev A_NONNULLPOINTER;
Button *mButtonNext A_NONNULLPOINTER;