mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Use larger unique gift preview.
This commit is contained in:
parent
03aa05e4d2
commit
4cab699b04
2 changed files with 7 additions and 3 deletions
|
@ -382,7 +382,8 @@ bool WebPageData::computeDefaultSmallMedia() const {
|
|||
&& description.empty()
|
||||
&& author.isEmpty()) {
|
||||
return false;
|
||||
} else if (!document
|
||||
} else if (!uniqueGift
|
||||
&& !document
|
||||
&& photo
|
||||
&& type != WebPageType::Photo
|
||||
&& type != WebPageType::Document
|
||||
|
|
|
@ -496,7 +496,9 @@ auto UniqueGiftBg(
|
|||
p.setPen(Qt::NoPen);
|
||||
const auto webpreview = (media.get() != view->media());
|
||||
const auto thickness = webpreview ? 0 : st::chatUniqueGiftBorder * 2;
|
||||
const auto radius = st::msgServiceGiftBoxRadius - thickness;
|
||||
const auto radius = webpreview
|
||||
? st::roundRadiusLarge
|
||||
: (st::msgServiceGiftBoxRadius - thickness);
|
||||
const auto full = QRect(0, 0, media->width(), media->height());
|
||||
const auto inner = full.marginsRemoved(
|
||||
{ thickness, thickness, thickness, thickness });
|
||||
|
@ -519,7 +521,8 @@ auto UniqueGiftBg(
|
|||
const auto width = media->width();
|
||||
const auto shift = width / 12;
|
||||
const auto doubled = width + 2 * shift;
|
||||
const auto outer = QRect(-shift, -shift, doubled, doubled);
|
||||
const auto top = (webpreview ? 2 : 1) * (-shift);
|
||||
const auto outer = QRect(-shift, top, doubled, doubled);
|
||||
p.setClipRect(inner);
|
||||
Ui::PaintPoints(
|
||||
p,
|
||||
|
|
Loading…
Add table
Reference in a new issue