2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-06 01:25:18 +00:00

Implement animated spoilers.

This commit is contained in:
John Preston
2022-09-17 00:23:27 +04:00
parent 4975254cc1
commit 749fb52113
291 changed files with 814 additions and 556 deletions

View File

@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/ui_utility.h"
#include "ui/chat/chat_theme.h"
#include "ui/toasts/common_toasts.h"
#include "ui/painter.h"
#include "boxes/premium_preview_box.h"
#include "data/data_peer.h"
#include "data/data_user.h"
@@ -184,7 +185,7 @@ void SectionWidget::PaintBackground(
not_null<Ui::ChatTheme*> theme,
not_null<QWidget*> widget,
QRect clip) {
Painter p(widget);
auto p = QPainter(widget);
const auto &background = theme->background();
if (background.colorForFill) {
@@ -277,7 +278,7 @@ void SectionWidget::PaintBackground(
void SectionWidget::paintEvent(QPaintEvent *e) {
if (_showAnimation) {
Painter p(this);
auto p = QPainter(this);
_showAnimation->paintContents(p);
}
}