mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-10 03:59:39 +00:00
Fix display of stickers in media viewer.
This commit is contained in:
parent
48fea47d16
commit
093d89db83
@ -3098,7 +3098,10 @@ void OverlayWidget::paintEvent(QPaintEvent *e) {
|
|||||||
const auto r = e->rect();
|
const auto r = e->rect();
|
||||||
const auto region = e->region();
|
const auto region = e->region();
|
||||||
const auto contentShown = _photo || documentContentShown();
|
const auto contentShown = _photo || documentContentShown();
|
||||||
const auto bgRegion = contentShown
|
const auto opaqueContentShown = contentShown
|
||||||
|
&& (!_document
|
||||||
|
|| (!_document->isVideoMessage() && !_document->sticker()));
|
||||||
|
const auto bgRegion = opaqueContentShown
|
||||||
? (region - contentRect())
|
? (region - contentRect())
|
||||||
: region;
|
: region;
|
||||||
|
|
||||||
@ -3385,9 +3388,9 @@ void OverlayWidget::paintTransformedStaticContent(Painter &p) {
|
|||||||
const auto rect = contentRect();
|
const auto rect = contentRect();
|
||||||
|
|
||||||
PainterHighQualityEnabler hq(p);
|
PainterHighQualityEnabler hq(p);
|
||||||
if ((!_document || !_documentMedia->getStickerLarge())
|
if ((!_document
|
||||||
&& (_staticContent.isNull()
|
|| (!_document->sticker() && !_document->isVideoMessage()))
|
||||||
|| _staticContent.hasAlpha())) {
|
&& (_staticContent.isNull() || _staticContent.hasAlpha())) {
|
||||||
p.fillRect(rect, _transparentBrush);
|
p.fillRect(rect, _transparentBrush);
|
||||||
}
|
}
|
||||||
if (_staticContent.isNull()) {
|
if (_staticContent.isNull()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user