diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-16 22:21:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-18 20:37:00 +0200 |
| commit | 93a781c8b9d34effd376537268970193b9b01479 (patch) | |
| tree | 719008d31a03a1b8904935e37b440d7aec33b8d1 /src/lib/release_notes.cc | |
| parent | fecfda4c913da3f60ab4329d1f4f412bc27d19a7 (diff) | |
Fix dark mode for release notes.
Diffstat (limited to 'src/lib/release_notes.cc')
| -rw-r--r-- | src/lib/release_notes.cc | 12 |
1 files changed, 8 insertions, 4 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 {}; |
