mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Show temporary placeholder topic icon.
This commit is contained in:
parent
5d43073efa
commit
2781fe2c34
2 changed files with 11 additions and 2 deletions
|
@ -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([=] {
|
||||
|
|
|
@ -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<Data::CloudImageView> &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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue