Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
257:699a20c57dc8 | 258:862d0d8619f6 |
---|---|
2 #include "core/json.h" | 2 #include "core/json.h" |
3 #include "core/session.h" | 3 #include "core/session.h" |
4 #include "core/strings.h" | 4 #include "core/strings.h" |
5 #include "gui/widgets/text.h" | 5 #include "gui/widgets/text.h" |
6 #include "pugixml.hpp" | 6 #include "pugixml.hpp" |
7 | |
8 #include <QCoreApplication> | |
7 #include <QFont> | 9 #include <QFont> |
8 #include <QHBoxLayout> | 10 #include <QHBoxLayout> |
9 #include <QTextBrowser> | 11 #include <QTextBrowser> |
10 #include <QTextCharFormat> | 12 #include <QTextCharFormat> |
11 #include <QTextCursor> | 13 #include <QTextCursor> |
12 #include <QCoreApplication> | 14 |
13 #include <curl/curl.h> | 15 #include <curl/curl.h> |
14 #ifdef WIN32 | 16 #ifdef WIN32 |
15 #include "sys/win32/dark_theme.h" | 17 # include "sys/win32/dark_theme.h" |
16 #endif | 18 #endif |
17 | 19 |
18 template <typename T, size_t N> | 20 template<typename T, size_t N> |
19 constexpr size_t array_size(T (&)[N]) { | 21 constexpr size_t array_size(T (&)[N]) { |
20 return N; | 22 return N; |
21 } | 23 } |
22 | 24 |
23 static constexpr semver::version pugixml_version{PUGIXML_VERSION / 1000 % 10, PUGIXML_VERSION / 10 % 100, PUGIXML_VERSION % 10}; | 25 static constexpr semver::version pugixml_version{PUGIXML_VERSION / 1000 % 10, PUGIXML_VERSION / 10 % 100, |
24 static constexpr semver::version json_version{NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, NLOHMANN_JSON_VERSION_PATCH}; | 26 PUGIXML_VERSION % 10}; |
27 static constexpr semver::version json_version{NLOHMANN_JSON_VERSION_MAJOR, NLOHMANN_JSON_VERSION_MINOR, | |
28 NLOHMANN_JSON_VERSION_PATCH}; | |
25 static constexpr semver::version semver_version{SEMVER_VERSION_MAJOR, SEMVER_VERSION_MINOR, SEMVER_VERSION_PATCH}; | 29 static constexpr semver::version semver_version{SEMVER_VERSION_MAJOR, SEMVER_VERSION_MINOR, SEMVER_VERSION_PATCH}; |
26 | 30 |
27 const char* get_curl_version() { | 31 const char* get_curl_version() { |
28 const curl_version_info_data* data = curl_version_info(CURLVERSION_NOW); | 32 const curl_version_info_data* data = curl_version_info(CURLVERSION_NOW); |
29 return data->version; | 33 return data->version; |
36 setAutoFillBackground(true); | 40 setAutoFillBackground(true); |
37 | 41 |
38 QHBoxLayout* layout = new QHBoxLayout(this); | 42 QHBoxLayout* layout = new QHBoxLayout(this); |
39 | 43 |
40 /* we have to generate this on-the-fly for localization purposes */ | 44 /* we have to generate this on-the-fly for localization purposes */ |
41 const QString html = QString( | 45 const QString html = |
42 "<body>" | 46 QString("<body>" |
43 " <h2 style=\"font-weight: normal;\"><strong>Minori</strong> v" + Strings::ToQString(session.version.to_string()) + "</h2>" | 47 " <h2 style=\"font-weight: normal;\"><strong>Minori</strong> v" + |
44 " <p>" | 48 Strings::ToQString(session.version.to_string()) + |
45 " <strong>" + tr("Author:") + "</strong><br>" | 49 "</h2>" |
46 " Paper (@mrpapersonic)" | 50 " <p>" |
47 " </p>" | 51 " <strong>" + |
48 " <p>" | 52 tr("Author:") + |
49 " <strong>" + tr("Third party components:") + "</strong><br>" | 53 "</strong><br>" |
50 "<a href=\"https://curl.se/\">libcurl v") + get_curl_version() + "</a>" | 54 " Paper (@mrpapersonic)" |
51 ", " | 55 " </p>" |
52 "<a href=\"https://p.yusukekamiyamane.com/\">Fugue Icons v3.5.6</a>" | 56 " <p>" |
53 ", " | 57 " <strong>" + |
54 "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>" | 58 tr("Third party components:") + |
55 ", " | 59 "</strong><br>" |
56 "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + Strings::ToQString(json_version.to_string()) + "</a>" | 60 "<a href=\"https://curl.se/\">libcurl v") + |
57 ", " | 61 get_curl_version() + |
58 "<a href=\"https://pugixml.org/\">pugixml v" + Strings::ToQString(pugixml_version.to_string()) + "</a>" | 62 "</a>" |
59 ", " | 63 ", " |
60 "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>" | 64 "<a href=\"https://p.yusukekamiyamane.com/\">Fugue Icons v3.5.6</a>" |
61 ", " | 65 ", " |
62 "<a href=\"https://github.com/Neargye/semver\">semver v" + Strings::ToQString(semver_version.to_string()) + "</a>" | 66 "<a href=\"https://github.com/erengy/anitomy\">Anitomy</a>" |
63 " </p>" | 67 ", " |
64 "<span>" | 68 "<a href=\"https://github.com/nlohmann/json\">JSON for Modern C++ v" + |
65 "<strong>" + tr("Special thanks:") + "</strong>" | 69 Strings::ToQString(json_version.to_string()) + |
66 "</span>" | 70 "</a>" |
67 " <ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 15px; margin-right: 0px; -qt-list-indent:0;\">" | 71 ", " |
68 " <li><strong>Eren Okka</strong> " + tr("for creating Taiga") + "</li>" | 72 "<a href=\"https://pugixml.org/\">pugixml v" + |
69 " <li><strong>Alex Huszagh</strong> " + tr("and") + " <strong>Colin Duquesnoy</strong> " + | 73 Strings::ToQString(pugixml_version.to_string()) + |
70 tr("for creating BreezeStyleSheets, on which the dark theme in this program is " | 74 "</a>" |
71 "based off of") + "</li>" | 75 ", " |
72 " <li><strong>Andy Brice</strong> " + tr("for providing some sample code for " | 76 "<a href=\"https://github.com/pulzed/mINI\">mINI v0.9.14</a>" |
73 "detecting dark mode on Windows and macOS") + "</li>" | 77 ", " |
74 " <li><strong>Manuel Wudka-Robles</strong> " + tr("for providing information on " | 78 "<a href=\"https://github.com/Neargye/semver\">semver v" + |
75 "getting open file descriptors on macOS") + "</li>" | 79 Strings::ToQString(semver_version.to_string()) + |
76 " </ul>" | 80 "</a>" |
77 "</body>"; | 81 ", parts of " |
82 "<a href=\"https://github.com/erengy/anisthesia\">Anisthesia</a>" | |
83 " </p>" | |
84 "<span>" | |
85 "<strong>" + | |
86 tr("Special thanks:") + | |
87 "</strong>" | |
88 "</span>" | |
89 " <ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 15px; margin-right: 0px; -qt-list-indent:0;\">" | |
90 " <li><strong>Eren Okka</strong> " + | |
91 tr("for creating Taiga") + | |
92 "</li>" | |
93 " <li><strong>Alex Huszagh</strong> " + | |
94 tr("and") + " <strong>Colin Duquesnoy</strong> " + | |
95 tr("for creating BreezeStyleSheets, on which the dark theme in this program is " | |
96 "based off of") + | |
97 "</li>" | |
98 " <li><strong>Andy Brice</strong> " + | |
99 tr("for providing some sample code for " | |
100 "detecting dark mode on Windows and macOS") + | |
101 "</li>" | |
102 " <li><strong>Manuel Wudka-Robles</strong> " + | |
103 tr("for providing information on " | |
104 "getting open file descriptors on macOS") + | |
105 "</li>" | |
106 " </ul>" | |
107 "</body>"; | |
78 | 108 |
79 { | 109 { |
80 QPalette pal = QPalette(); | 110 QPalette pal = QPalette(); |
81 pal.setColor(QPalette::Window, pal.color(QPalette::Base)); | 111 pal.setColor(QPalette::Window, pal.color(QPalette::Base)); |
82 setPalette(pal); | 112 setPalette(pal); |