From c4982711db7d79e73b109250dc65f36da3540ab5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 2 Sep 2021 13:28:07 +0300 Subject: [PATCH] Use ui/style/style_core_palette. --- Telegram/SourceFiles/ui/chat/chat_style.h | 1 + Telegram/SourceFiles/ui/chat/chat_theme.cpp | 3 +++ Telegram/SourceFiles/ui/chat/chat_theme.h | 6 ++++++ Telegram/SourceFiles/window/themes/window_theme.h | 1 + Telegram/codegen | 2 +- Telegram/lib_ui | 2 +- 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/ui/chat/chat_style.h b/Telegram/SourceFiles/ui/chat/chat_style.h index 259cae81c4..9a18d36f64 100644 --- a/Telegram/SourceFiles/ui/chat/chat_style.h +++ b/Telegram/SourceFiles/ui/chat/chat_style.h @@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #pragma once #include "ui/cached_round_corners.h" +#include "ui/style/style_core_palette.h" namespace Ui { diff --git a/Telegram/SourceFiles/ui/chat/chat_theme.cpp b/Telegram/SourceFiles/ui/chat/chat_theme.cpp index c46dbcb26d..e98316d538 100644 --- a/Telegram/SourceFiles/ui/chat/chat_theme.cpp +++ b/Telegram/SourceFiles/ui/chat/chat_theme.cpp @@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/image/image_prepare.h" #include "ui/ui_utility.h" #include "ui/chat/message_bubble.h" +#include "ui/style/style_core_palette.h" #include #include @@ -168,6 +169,8 @@ ChatTheme::ChatTheme(ChatThemeDescriptor &&descriptor) setBackground(descriptor.prepareBackground()); } +ChatTheme::~ChatTheme() = default; + void ChatTheme::setBackground(ChatThemeBackground &&background) { _mutableBackground = std::move(background); _backgroundState = {}; diff --git a/Telegram/SourceFiles/ui/chat/chat_theme.h b/Telegram/SourceFiles/ui/chat/chat_theme.h index d27d0574e2..2d57735bc4 100644 --- a/Telegram/SourceFiles/ui/chat/chat_theme.h +++ b/Telegram/SourceFiles/ui/chat/chat_theme.h @@ -11,6 +11,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/timer.h" #include "base/weak_ptr.h" +namespace style { +class palette; +} // namespace style + namespace Ui { class ChatStyle; @@ -112,6 +116,8 @@ public: // Expected to be invoked on a background thread. Invokes callbacks there. ChatTheme(ChatThemeDescriptor &&descriptor); + ~ChatTheme(); + [[nodiscard]] uint64 key() const; [[nodiscard]] const style::palette *palette() const { return _palette.get(); diff --git a/Telegram/SourceFiles/window/themes/window_theme.h b/Telegram/SourceFiles/window/themes/window_theme.h index 6c2b691dcf..db3e366803 100644 --- a/Telegram/SourceFiles/window/themes/window_theme.h +++ b/Telegram/SourceFiles/window/themes/window_theme.h @@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "data/data_wall_paper.h" #include "data/data_cloud_themes.h" +#include "ui/style/style_core_palette.h" namespace Main { class Session; diff --git a/Telegram/codegen b/Telegram/codegen index 62158ed795..aaa64e67cb 160000 --- a/Telegram/codegen +++ b/Telegram/codegen @@ -1 +1 @@ -Subproject commit 62158ed7955af3f7eabb1156075c1a41c4fff6b3 +Subproject commit aaa64e67cb247112dad396fd75f8ef3c1849aed3 diff --git a/Telegram/lib_ui b/Telegram/lib_ui index ea570c07b6..c88762d0eb 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit ea570c07b6feef698f103a2876991f05f3ea1eb3 +Subproject commit c88762d0eb860064927bacaa784acd9a4f23c39b