diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-19 20:06:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-19 20:06:56 +0300 |
commit | 31ebff102bf7de06c107222b7583460144390bca (patch) | |
tree | 8f0578c4fc77bf045e4f54737ac00e355ec3bd24 | |
parent | 0c8c3d955b1a481f6900723ad8f43d074190aa7d (diff) | |
download | plus-31ebff102bf7de06c107222b7583460144390bca.tar.gz plus-31ebff102bf7de06c107222b7583460144390bca.tar.bz2 plus-31ebff102bf7de06c107222b7583460144390bca.tar.xz plus-31ebff102bf7de06c107222b7583460144390bca.zip |
Use staticbrowserbox in didyouknowwindow.
-rw-r--r-- | src/gui/windows/didyouknowwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/didyouknowwindow.h | 4 |
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; |