Fixed color of bubbles while simple sending animation in complex themes.

This commit is contained in:
23rd
2025-10-11 11:42:17 +03:00
parent b1e707c346
commit de88ddf42b
@@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/painter.h"
#include "ui/rect.h"
#include "ui/rp_widget.h"
#include "ui/power_saving.h"
#include "ui/text/text_isolated_emoji.h"
#include "window/window_session_controller.h"
#include "styles/style_chat.h"
@@ -365,8 +366,8 @@ void Content::createBubble() {
_bubble.widget->stackUnder(this);
_bubble.widget->paintRequest(
) | rpl::start_with_next([=](const QRect &r) {
Painter p(_bubble.widget);
) | rpl::start_with_next([=, raw = _bubble.widget.get()](const QRect &r) {
auto p = Painter(raw);
p.fillRect(r, Qt::transparent);
@@ -393,7 +394,15 @@ void Content::createBubble() {
context.skipDrawingParts = Context::SkipDrawingParts::Content;
context.outbg = currentView->hasOutLayout();
context.translate(paintOffsetLeft, -context.viewport.y());
const auto diff = context.viewport.height() - raw->height();
auto bottom = anim::interpolate(_from.y(), _to.y(), progress);
if (bottom > diff) {
bottom = diff;
}
if (bottom < raw->height()) {
bottom = raw->height();
}
context.translate(paintOffsetLeft, -context.viewport.y() - bottom);
p.translate(-paintOffsetLeft, 0);
currentView->draw(p, context);
@@ -438,7 +447,8 @@ void MessageSendingAnimationController::appendSending(
}
void MessageSendingAnimationController::startAnimation(SendingInfoTo &&to) {
if (anim::Disabled()) {
if (anim::Disabled()
|| PowerSaving::On(PowerSaving::Flag::kChatEffects)) {
return;
}
const auto container = _controller->content();