From e2755e28439956cbb3c34adfaa87ae1b083e6029 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 29 Aug 2024 12:13:21 +0200 Subject: Apply a margin to the text in the help window And removed the manual space character at the start of each line... --- src/gui/helpwindow.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') 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 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); - } } -- cgit v1.2.3-70-g09d2