From 2781fe2c34c6827453fb6c78b2b95bf82ae7d758 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 4 Oct 2022 21:02:40 +0400 Subject: [PATCH] Show temporary placeholder topic icon. --- .../SourceFiles/boxes/peers/edit_forum_topic_box.cpp | 4 +++- Telegram/SourceFiles/data/data_forum_topic.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_forum_topic_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_forum_topic_box.cpp index d8354c9b0..756767b5d 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_forum_topic_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_forum_topic_box.cpp @@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "window/window_session_controller.h" #include "settings/settings_common.h" #include "apiwrap.h" +#include "styles/style_chat_helpers.h" namespace { @@ -77,7 +78,8 @@ namespace { if (state->chosen) { state->chosen->paint(p, args); } else { - p.fillRect(clip, Qt::red); + // #TODO forum + st::stickersPremium.paint(p, 0, 0, result->width()); } }, result->lifetime()); result->setClickedCallback([=] { diff --git a/Telegram/SourceFiles/data/data_forum_topic.cpp b/Telegram/SourceFiles/data/data_forum_topic.cpp index fa866fc33..22110b362 100644 --- a/Telegram/SourceFiles/data/data_forum_topic.cpp +++ b/Telegram/SourceFiles/data/data_forum_topic.cpp @@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/history_item.h" #include "ui/painter.h" #include "styles/style_dialogs.h" +#include "styles/style_chat_helpers.h" namespace Data { @@ -216,14 +217,20 @@ void ForumTopic::paintUserpic( Painter &p, std::shared_ptr &view, const Dialogs::Ui::PaintContext &context) const { + const auto &st = context.st; if (_icon) { - const auto &st = context.st; _icon->paint(p, { .preview = st::windowBgOver->c, .now = context.now, .position = QPoint(st->padding.left(), st->padding.top()), .paused = context.paused, }); + } else { + // #TODO forum + st::stickersPremium.paint( + p, + QPoint(st->padding.left(), st->padding.top()), + st->padding.left() * 2 + st::stickersPremium.width()); } }