mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix icon coloring in new bot topics.
This commit is contained in:
@@ -969,7 +969,8 @@ void EmptyPainter::paint(
|
||||
if (_icon) {
|
||||
_icon->paintInRect(
|
||||
p,
|
||||
QRect(bubbleLeft, top, bubbleWidth, iconHeight));
|
||||
QRect(bubbleLeft, top, bubbleWidth, iconHeight),
|
||||
st->msgServiceFg()->c);
|
||||
top += iconHeight + st::historyGroupAboutHeaderSkip;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ TopicIconView::TopicIconView(
|
||||
setup(topic);
|
||||
}
|
||||
|
||||
void TopicIconView::paintInRect(QPainter &p, QRect rect) {
|
||||
void TopicIconView::paintInRect(QPainter &p, QRect rect, QColor textColor) {
|
||||
const auto paint = [&](const QImage &image) {
|
||||
const auto size = image.size() / style::DevicePixelRatio();
|
||||
p.drawImage(
|
||||
@@ -125,7 +125,9 @@ void TopicIconView::paintInRect(QPainter &p, QRect rect) {
|
||||
image);
|
||||
};
|
||||
if (_player && _player->ready()) {
|
||||
const auto colored = _playerUsesTextColor
|
||||
const auto colored = (textColor.alpha() > 0)
|
||||
? textColor
|
||||
: _playerUsesTextColor
|
||||
? st::windowFg->c
|
||||
: QColor(0, 0, 0, 0);
|
||||
paint(_player->frame(
|
||||
|
||||
@@ -63,7 +63,10 @@ public:
|
||||
Fn<void()> update,
|
||||
const style::color &generalIconFg);
|
||||
|
||||
void paintInRect(QPainter &p, QRect rect);
|
||||
void paintInRect(
|
||||
QPainter &p,
|
||||
QRect rect,
|
||||
QColor textColor = QColor(0, 0, 0, 0));
|
||||
|
||||
private:
|
||||
using StickerPlayer = HistoryView::StickerPlayer;
|
||||
|
||||
Reference in New Issue
Block a user