2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Update default chat background.

This commit is contained in:
John Preston
2021-08-31 22:10:39 +03:00
parent d29a1f5cd2
commit f59db10267
11 changed files with 110 additions and 47 deletions

View File

@@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/image/image_prepare.h"
#include "ui/emoji_config.h"
#include "ui/chat/chat_theme.h"
#include "ui/image/image_prepare.h"
#include "styles/style_widgets.h"
#include "styles/style_window.h"
#include "styles/style_media_view.h"
@@ -417,7 +418,16 @@ void Generator::paintHistoryBackground() {
if (background.isNull()) {
const auto fakePaper = Data::WallPaper(_current.backgroundId);
if (Data::IsThemeWallPaper(fakePaper)) {
background.load(qsl(":/gui/art/background.jpg"));
background = Ui::ReadBackgroundImage(
u":/gui/art/background.tgv"_q,
QByteArray(),
true);
const auto paper = Data::DefaultWallPaper();
background = Ui::PreparePatternImage(
std::move(background),
paper.backgroundColors(),
paper.gradientRotation(),
paper.patternOpacity());
tiled = false;
} else {
background = std::move(_current.backgroundImage);