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

@@ -709,8 +709,14 @@ object_ptr<Ui::RpWidget> ForwardsPrivacyController::setupAboveWidget(
Window::SectionWidget::PaintBackground(_controller, widget, rect);
Painter p(widget);
const auto context = HistoryView::PaintContext{
.bubblesPattern = nullptr, // #TODO bubbles
.viewport = widget->rect(),
.clip = widget->rect(),
.now = crl::now(),
};
p.translate(0, padding + view->marginBottom());
view->draw(p, widget->rect(), TextSelection(), crl::now());
view->draw(p, context);
PaintForwardedTooltip(p, view, *option);
}, widget->lifetime());