diff options
author | TheMarlboroMan <marlborometal@gmail.com> | 2020-01-27 18:32:34 +0100 |
---|---|---|
committer | TheMarlboroMan <marlborometal@gmail.com> | 2020-01-27 18:32:34 +0100 |
commit | c4e4a3f0faf756262e306984ddb56c262bfb087c (patch) | |
tree | 6a4e033294b855aff9ab0627632d2bdf170d50e8 /plugingui | |
parent | da1255d1da3f39b727e14f48e90823484e207962 (diff) |
Restoring the plugin and a small change to the about tab
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/abouttab.cc | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/plugingui/abouttab.cc b/plugingui/abouttab.cc index 7e330cb..360a994 100644 --- a/plugingui/abouttab.cc +++ b/plugingui/abouttab.cc @@ -52,50 +52,35 @@ void AboutTab::resize(std::size_t width, std::size_t height) std::string AboutTab::getAboutText() { + //TODO: This does not respect the original format. + auto generate_header=[](const std::string& header, bool ignore_nl=false) -> std::string + { + + return std::string("*===========*\n ") + +header + +"\n*===========*\n\n\n"; + }; + std::string about_text; // About - about_text.append( - "=============\n" - " About\n" - "=============\n" - "\n"); + about_text.append(generate_header("About")); about_text.append(about.data()); // Version - about_text.append( - "\n" - "=============\n" - " Version\n" - "=============\n" - "\n"); + about_text.append(generate_header("Version")); about_text.append(std::string(VERSION) + "\n"); // Bugs - about_text.append( - "\n" - "=============\n" - " Bugs\n" - "=============\n" - "\n"); + about_text.append(generate_header("Bugs")); about_text.append(bugs.data()); // Authors - about_text.append( - "\n" - "=============\n" - " Authors\n" - "=============\n" - "\n"); + about_text.append(generate_header("Authors")); about_text.append(UTF8().toLatin1(authors.data())); // GPL - about_text.append( - "\n" - "=============\n" - " License\n" - "=============\n" - "\n"); + about_text.append(generate_header("License")); about_text.append(gpl.data()); return about_text; |