Mercurial > minori
diff src/gui/dialog/about.cc @ 258:862d0d8619f6
*: HUUUGE changes
animia has been renamed to animone, so instead of thinking of a
health condition, you think of a beautiful flower :)
I've also edited some of the code for animone, but I have no idea
if it even works or not because I don't have a mac or windows
machine lying around. whoops!
... anyway, all of the changes divergent from Anisthesia are now
licensed under BSD. it's possible that I could even rewrite most
of the code to where I don't even have to keep the MIT license,
but that's thinking too far into the future
I've been slacking off on implementing the anime seasons page,
mostly out of laziness. I think I'd have to create another db file
specifically for the seasons
anyway, this code is being pushed *primarily* because the hard drive
it's on is failing! yay :)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 01 Apr 2024 02:43:44 -0400 |
parents | fe702c8f161f |
children | ac1451035c85 |
line wrap: on
line diff
--- a/src/gui/dialog/about.cc Sun Feb 18 16:02:14 2024 -0500 +++ b/src/gui/dialog/about.cc Mon Apr 01 02:43:44 2024 -0400 @@ -4,24 +4,28 @@ #include "core/strings.h" #include "gui/widgets/text.h" #include "pugixml.hpp" + +#include <QCoreApplication> #include <QFont> #include <QHBoxLayout> #include <QTextBrowser> #include <QTextCharFormat> #include <QTextCursor> -#include <QCoreApplication> + #include <curl/curl.h> #ifdef WIN32 -#include "sys/win32/dark_theme.h" +# include "sys/win32/dark_theme.h" #endif -template <typename T, size_t N> +template<typename T, size_t N> constexpr size_t array_size(T (&)[N]) { return N; } -static constexpr semver::version pugixml_version{PUGIXML_VERSION / 1000 % 10, PUGIXML_VERSION / 10 % 100, PUGIXML_VERSION % 10}; -static constexpr semver::version json_version{NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, NLOHMANN_JSON_VERSION_PATCH}; +static constexpr semver::version pugixml_version{PUGIXML_VERSION / 1000 % 10, PUGIXML_VERSION / 10 % 100, + PUGIXML_VERSION % 10}; +static constexpr semver::version json_version{NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, + NLOHMANN_JSON_VERSION_PATCH}; static constexpr semver::version semver_version{SEMVER_VERSION_MAJOR, SEMVER_VERSION_MINOR, SEMVER_VERSION_PATCH}; const char* get_curl_version() { @@ -38,43 +42,69 @@ QHBoxLayout* layout = new QHBoxLayout(this); /* we have to generate this on-the-fly for localization purposes */ - const QString html = QString( - "<body>" - " <h2 style=\"font-weight: normal;\"><strong>Minori</strong> v" + Strings::ToQString(session.version.to_string()) + "</h2>" - " <p>" - " <strong>" + tr("Author:") + "</strong><br>" - " Paper (@mrpapersonic)" - " </p>" - " <p>" - " <strong>" + tr("Third party components:") + "</strong><br>" - "<a href=\"https://curl.se/\">libcurl v") + get_curl_version() + "</a>" - ", " - "<a href=\"https://p.yusukekamiyamane.com/\">Fugue Icons v3.5.6</a>" - ", " - "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>" - ", " - "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + Strings::ToQString(json_version.to_string()) + "</a>" - ", " - "<a href=\"https://pugixml.org/\">pugixml v" + Strings::ToQString(pugixml_version.to_string()) + "</a>" - ", " - "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>" - ", " - "<a href=\"https://github.com/Neargye/semver\">semver v" + Strings::ToQString(semver_version.to_string()) + "</a>" - " </p>" - "<span>" - "<strong>" + tr("Special thanks:") + "</strong>" - "</span>" - " <ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 15px; margin-right: 0px; -qt-list-indent:0;\">" - " <li><strong>Eren Okka</strong> " + tr("for creating Taiga") + "</li>" - " <li><strong>Alex Huszagh</strong> " + tr("and") + " <strong>Colin Duquesnoy</strong> " + - tr("for creating BreezeStyleSheets, on which the dark theme in this program is " - "based off of") + "</li>" - " <li><strong>Andy Brice</strong> " + tr("for providing some sample code for " - "detecting dark mode on Windows and macOS") + "</li>" - " <li><strong>Manuel Wudka-Robles</strong> " + tr("for providing information on " - "getting open file descriptors on macOS") + "</li>" - " </ul>" - "</body>"; + const QString html = + QString("<body>" + " <h2 style=\"font-weight: normal;\"><strong>Minori</strong> v" + + Strings::ToQString(session.version.to_string()) + + "</h2>" + " <p>" + " <strong>" + + tr("Author:") + + "</strong><br>" + " Paper (@mrpapersonic)" + " </p>" + " <p>" + " <strong>" + + tr("Third party components:") + + "</strong><br>" + "<a href=\"https://curl.se/\">libcurl v") + + get_curl_version() + + "</a>" + ", " + "<a href=\"https://p.yusukekamiyamane.com/\">Fugue Icons v3.5.6</a>" + ", " + "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>" + ", " + "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + + Strings::ToQString(json_version.to_string()) + + "</a>" + ", " + "<a href=\"https://pugixml.org/\">pugixml v" + + Strings::ToQString(pugixml_version.to_string()) + + "</a>" + ", " + "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>" + ", " + "<a href=\"https://github.com/Neargye/semver\">semver v" + + Strings::ToQString(semver_version.to_string()) + + "</a>" + ", parts of " + "<a href=\"https://github.com/erengy/anisthesia\">Anisthesia</a>" + " </p>" + "<span>" + "<strong>" + + tr("Special thanks:") + + "</strong>" + "</span>" + " <ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 15px; margin-right: 0px; -qt-list-indent:0;\">" + " <li><strong>Eren Okka</strong> " + + tr("for creating Taiga") + + "</li>" + " <li><strong>Alex Huszagh</strong> " + + tr("and") + " <strong>Colin Duquesnoy</strong> " + + tr("for creating BreezeStyleSheets, on which the dark theme in this program is " + "based off of") + + "</li>" + " <li><strong>Andy Brice</strong> " + + tr("for providing some sample code for " + "detecting dark mode on Windows and macOS") + + "</li>" + " <li><strong>Manuel Wudka-Robles</strong> " + + tr("for providing information on " + "getting open file descriptors on macOS") + + "</li>" + " </ul>" + "</body>"; { QPalette pal = QPalette();