mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
Fixed display of custom badge in selected messages for giveaways.
This commit is contained in:
@@ -514,6 +514,10 @@ void StickerWithBadgePart::paintBadge(
|
|||||||
const auto inner = QRectF(rect) - Margins(half);
|
const auto inner = QRectF(rect) - Margins(half);
|
||||||
const auto radius = inner.height() / 2.;
|
const auto radius = inner.height() / 2.;
|
||||||
p.drawRoundedRect(inner, radius, radius);
|
p.drawRoundedRect(inner, radius, radius);
|
||||||
|
if (_colorOverride && context.selected()) {
|
||||||
|
p.setBrush(context.st->msgStickerOverlay());
|
||||||
|
p.drawRoundedRect(inner, radius, radius);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_sticker.parent()->usesBubblePattern(context)) {
|
if (!_sticker.parent()->usesBubblePattern(context)) {
|
||||||
@@ -578,7 +582,9 @@ void StickerWithBadgePart::validateBadge(
|
|||||||
p.drawImage(
|
p.drawImage(
|
||||||
left,
|
left,
|
||||||
half + (inner.height() - iconHeight) / 2,
|
half + (inner.height() - iconHeight) / 2,
|
||||||
_customLeftIcon);
|
context.selected()
|
||||||
|
? Images::Colored(base::duplicate(_customLeftIcon), _badgeFg)
|
||||||
|
: _customLeftIcon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user