Base custom chat themes on a separate dark theme.

This commit is contained in:
John Preston 2021-09-19 11:40:15 +03:00
parent 155bbed3f4
commit 2c7d8858c0
3 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -60,6 +60,7 @@
<file alias="day-blue.tdesktop-theme">../../day-blue.tdesktop-theme</file>
<file alias="night.tdesktop-theme">../../night.tdesktop-theme</file>
<file alias="night-green.tdesktop-theme">../../night-green.tdesktop-theme</file>
<file alias="night-custom-base.tdesktop-theme">../../night-custom-base.tdesktop-theme</file>
<file alias="icons/calls/hands.lottie">../../icons/calls/hands.lottie</file>
<file alias="icons/calls/voice.lottie">../../icons/calls/voice.lottie</file>
<file alias="recording/info_audio.svg">../../art/recording/recording_info_audio.svg</file>

View File

@ -76,6 +76,7 @@ namespace Window {
namespace {
constexpr auto kMaxChatEntryHistorySize = 50;
constexpr auto kNightBaseFile = ":/gui/night-custom-base.tdesktop-theme"_cs;
[[nodiscard]] Fn<void(style::palette&)> PreparePaletteCallback(
bool dark,
@ -95,7 +96,7 @@ constexpr auto kMaxChatEntryHistorySize = 50;
if (dark) {
auto instance = Instance();
const auto loaded = LoadFromFile(
i->path,
kNightBaseFile.utf16(),
&instance,
nullptr,
nullptr,