summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
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;
};