diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-08-29 12:13:21 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-08-31 11:30:20 +0200 |
commit | e2755e28439956cbb3c34adfaa87ae1b083e6029 (patch) | |
tree | fc773710e239cf3d9cc135704e27c3049b2f19a8 /src/gui/helpwindow.cpp | |
parent | 4b8568c9dfbcee9d547f44187eb1b72e796157aa (diff) | |
download | mana-e2755e28439956cbb3c34adfaa87ae1b083e6029.tar.gz mana-e2755e28439956cbb3c34adfaa87ae1b083e6029.tar.bz2 mana-e2755e28439956cbb3c34adfaa87ae1b083e6029.tar.xz mana-e2755e28439956cbb3c34adfaa87ae1b083e6029.zip |
Apply a margin to the text in the help window
And removed the manual space character at the start of each line...
Diffstat (limited to 'src/gui/helpwindow.cpp')
-rw-r--r-- | src/gui/helpwindow.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp index 1dfc109e..7bb31188 100644 --- a/src/gui/helpwindow.cpp +++ b/src/gui/helpwindow.cpp @@ -47,6 +47,7 @@ HelpWindow::HelpWindow(): setDefaultSize(500, 400, ImageRect::CENTER); mBrowserBox = new BrowserBox; + mBrowserBox->setFrameSize(4); mScrollArea = new ScrollArea(mBrowserBox); auto *okButton = new Button(_("Close"), "close", this); @@ -65,9 +66,7 @@ HelpWindow::HelpWindow(): void HelpWindow::action(const gcn::ActionEvent &event) { if (event.getId() == "close") - { setVisible(false); - } } void HelpWindow::handleLink(const std::string &link) @@ -93,11 +92,8 @@ void HelpWindow::loadFile(const std::string &file) std::string helpPath = branding.getStringValue("helpPath"); if (helpPath.empty()) helpPath = paths.getStringValue("help"); - std::vector<std::string> lines = - resman->loadTextFile(helpPath + file + ".txt"); - for (const auto &line : lines) - { + const auto lines = resman->loadTextFile(helpPath + file + ".txt"); + for (auto &line : lines) mBrowserBox->addRow(line); - } } |