mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 "window/window_session_controller.h"
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -77,7 +78,8 @@ namespace {
|
||||||
if (state->chosen) {
|
if (state->chosen) {
|
||||||
state->chosen->paint(p, args);
|
state->chosen->paint(p, args);
|
||||||
} else {
|
} else {
|
||||||
p.fillRect(clip, Qt::red);
|
// #TODO forum
|
||||||
|
st::stickersPremium.paint(p, 0, 0, result->width());
|
||||||
}
|
}
|
||||||
}, result->lifetime());
|
}, result->lifetime());
|
||||||
result->setClickedCallback([=] {
|
result->setClickedCallback([=] {
|
||||||
|
|
|
@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/history_item.h"
|
#include "history/history_item.h"
|
||||||
#include "ui/painter.h"
|
#include "ui/painter.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
||||||
|
@ -216,14 +217,20 @@ void ForumTopic::paintUserpic(
|
||||||
Painter &p,
|
Painter &p,
|
||||||
std::shared_ptr<Data::CloudImageView> &view,
|
std::shared_ptr<Data::CloudImageView> &view,
|
||||||
const Dialogs::Ui::PaintContext &context) const {
|
const Dialogs::Ui::PaintContext &context) const {
|
||||||
|
const auto &st = context.st;
|
||||||
if (_icon) {
|
if (_icon) {
|
||||||
const auto &st = context.st;
|
|
||||||
_icon->paint(p, {
|
_icon->paint(p, {
|
||||||
.preview = st::windowBgOver->c,
|
.preview = st::windowBgOver->c,
|
||||||
.now = context.now,
|
.now = context.now,
|
||||||
.position = QPoint(st->padding.left(), st->padding.top()),
|
.position = QPoint(st->padding.left(), st->padding.top()),
|
||||||
.paused = context.paused,
|
.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