summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-18 20:37:14 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-18 20:37:14 +0200
commita2b97a1e3e4211a5c6b86ab780bcb9f5f4a9eeeb (patch)
tree354d75141352ab018a7a7020a28c68691ec1a23e /src/lib
parente983d424808894dc9b036c46cd61d8fa39487dfd (diff)
parent179685ef5cfb81d362282ee2fae526533e6404a3 (diff)
Improve the appearance of things in macOS dark mode in various ways.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/release_notes.cc12
-rw-r--r--src/lib/release_notes.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/release_notes.cc b/src/lib/release_notes.cc
index 236713184..d69738427 100644
--- a/src/lib/release_notes.cc
+++ b/src/lib/release_notes.cc
@@ -31,7 +31,7 @@ using boost::optional;
optional<string>
-find_release_notes(optional<string> current)
+find_release_notes(bool dark, optional<string> current)
{
auto last = Config::instance()->last_release_notes_version();
if (!current) {
@@ -43,14 +43,18 @@ find_release_notes(optional<string> current)
Config::instance()->set_last_release_notes_version(*current);
- const string header = String::compose("<h1>DCP-o-matic %1 release notes</h1>", *current);
+ string const colour = dark ? "white" : "black";
+ auto const span = String::compose("<span style=\"color: %1\">", colour);
+
+ const string header = String::compose("<h1>%1DCP-o-matic %2 release notes</span></h1>", span, *current);
if (!last) {
- return header +
+ return header + span +
_("In this version there are changes to the way that subtitles are positioned. "
"Positioning should now be more correct, with respect to the standards, but you "
"should check any subtitles in your project to make sure that they are placed "
- "where you want them.");
+ "where you want them.")
+ + "</span>";
}
return {};
diff --git a/src/lib/release_notes.h b/src/lib/release_notes.h
index a5026b432..d0837248b 100644
--- a/src/lib/release_notes.h
+++ b/src/lib/release_notes.h
@@ -23,4 +23,4 @@
#include <string>
-extern boost::optional<std::string> find_release_notes(boost::optional<std::string> current = boost::optional<std::string>());
+extern boost::optional<std::string> find_release_notes(bool dark, boost::optional<std::string> current = boost::optional<std::string>());