2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow arbitrary QImage as outgoing bubbles background.

This commit is contained in:
John Preston
2021-08-19 17:22:12 +03:00
parent 1cc9a52461
commit f4fdadd3b0
21 changed files with 677 additions and 232 deletions

View File

@@ -564,13 +564,18 @@ void ConfirmContactBox::paintEvent(QPaintEvent *e) {
p.fillRect(e->rect(), st::boxBg);
const auto ms = crl::now();
const auto context = HistoryView::PaintContext{
.bubblesPattern = nullptr, // #TODO bubbles
.viewport = rect(),
.clip = rect(),
.now = crl::now(),
};
p.translate(st::boxPadding.left(), 0);
if (_comment) {
_comment->draw(p, rect(), TextSelection(), ms);
_comment->draw(p, context);
p.translate(0, _comment->height());
}
_contact->draw(p, rect(), TextSelection(), ms);
_contact->draw(p, context);
}
HistoryView::Context ConfirmContactBox::elementContext() {