2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Make complex gradients animate on outgoing messages.

This commit is contained in:
John Preston
2021-08-16 16:07:43 +03:00
parent a1f81e4de8
commit 7a06eccaec
5 changed files with 268 additions and 69 deletions

View File

@@ -875,6 +875,12 @@ QImage ChatBackground::gradientForFill() const {
return _gradient;
}
void ChatBackground::recacheGradientForFill(QImage gradient) {
if (_gradient.size() == gradient.size()) {
_gradient = std::move(gradient);
}
}
QImage ChatBackground::createCurrentImage() const {
if (const auto fill = colorForFill()) {
auto result = QImage(