summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-19 18:54:45 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-19 18:54:45 +0300
commit76f9c784e2f850e2a9070eaf93488f7459c461ef (patch)
treedbe6f78d9daceaac62fa8b497494f53a3fd6a784 /src/gui/windows
parent59210410f604eb79f5cde445b788cf7f38641460 (diff)
downloadmanaverse-76f9c784e2f850e2a9070eaf93488f7459c461ef.tar.gz
manaverse-76f9c784e2f850e2a9070eaf93488f7459c461ef.tar.bz2
manaverse-76f9c784e2f850e2a9070eaf93488f7459c461ef.tar.xz
manaverse-76f9c784e2f850e2a9070eaf93488f7459c461ef.zip
Use staticbrowserbox in helpwindow.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/helpwindow.cpp7
-rw-r--r--src/gui/windows/helpwindow.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 85a14594d..ce121a98f 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -35,7 +35,7 @@
#include "gui/windows/setupwindow.h"
#include "gui/widgets/button.h"
-#include "gui/widgets/browserbox.h"
+#include "gui/widgets/staticbrowserbox.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/scrollarea.h"
@@ -58,7 +58,7 @@ HelpWindow::HelpWindow() :
ActionListener(),
// TRANSLATORS: help window. button.
mDYKButton(new Button(this, _("Did you know..."), "DYK", this)),
- mBrowserBox(new BrowserBox(this, BrowserBoxMode::AUTO_SIZE, Opaque_true,
+ mBrowserBox(new StaticBrowserBox(this, Opaque_true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
Opaque_true, "help_background.xml")),
@@ -128,6 +128,7 @@ void HelpWindow::loadHelp(const std::string &helpFile)
loadFile(helpFile);
loadFile("footer");
mScrollArea->setVerticalScrollAmount(0);
+ mBrowserBox->updateHeight();
setVisible(Visible_true);
}
@@ -138,6 +139,7 @@ void HelpWindow::loadHelpSimple(const std::string &helpFile)
mBrowserBox->clearRows();
loadFile(helpFile);
mScrollArea->setVerticalScrollAmount(0);
+ mBrowserBox->updateHeight();
setVisible(Visible_true);
}
@@ -209,6 +211,7 @@ void HelpWindow::search(const std::string &text0)
}
loadFile("footer");
mScrollArea->setVerticalScrollAmount(0);
+ mBrowserBox->updateHeight();
setVisible(Visible_true);
}
}
diff --git a/src/gui/windows/helpwindow.h b/src/gui/windows/helpwindow.h
index 59e5405ff..2fb2407d9 100644
--- a/src/gui/windows/helpwindow.h
+++ b/src/gui/windows/helpwindow.h
@@ -31,8 +31,8 @@
#include "localconsts.h"
class Button;
-class BrowserBox;
class ScrollArea;
+class StaticBrowserBox;
typedef std::set<std::string> HelpNames;
typedef HelpNames::const_iterator HelpNamesCIter;
@@ -82,7 +82,7 @@ class HelpWindow final : public Window,
void loadFile(std::string file);
Button *mDYKButton A_NONNULLPOINTER;
- BrowserBox *mBrowserBox A_NONNULLPOINTER;
+ StaticBrowserBox *mBrowserBox A_NONNULLPOINTER;
ScrollArea *mScrollArea A_NONNULLPOINTER;
HelpTagsMap mTagFileMap;
};