Even nicer empty chat.

This commit is contained in:
John Preston 2025-06-04 16:48:37 +04:00
parent 8dc151e14d
commit 28e7afa412
5 changed files with 8 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -403,7 +403,9 @@ EmptyChatLockedBox::EmptyChatLockedBox(not_null<Element*> parent, Type type)
EmptyChatLockedBox::~EmptyChatLockedBox() = default; EmptyChatLockedBox::~EmptyChatLockedBox() = default;
int EmptyChatLockedBox::width() { int EmptyChatLockedBox::width() {
return st::premiumRequiredWidth; return (_type == Type::PremiumRequired)
? st::premiumRequiredWidth
: st::starsPerMessageWidth;
} }
int EmptyChatLockedBox::top() { int EmptyChatLockedBox::top() {
@ -460,7 +462,9 @@ void EmptyChatLockedBox::draw(
p.setBrush(context.st->msgServiceBg()); // ? p.setBrush(context.st->msgServiceBg()); // ?
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
p.drawEllipse(geometry); p.drawEllipse(geometry);
st::premiumRequiredIcon.paintInCenter(p, geometry); (_type == Type::PremiumRequired
? st::premiumRequiredIcon
: st::directMessagesIcon).paintInCenter(p, geometry);
} }
void EmptyChatLockedBox::stickerClearLoopPlayed() { void EmptyChatLockedBox::stickerClearLoopPlayed() {

View file

@ -1055,6 +1055,8 @@ chatSimilarSkip: 12px;
premiumRequiredWidth: 186px; premiumRequiredWidth: 186px;
premiumRequiredIcon: icon{{ "chat/large_lockedchat", msgServiceFg }}; premiumRequiredIcon: icon{{ "chat/large_lockedchat", msgServiceFg }};
premiumRequiredCircle: 60px; premiumRequiredCircle: 60px;
directMessagesIcon: icon{{ "chat/large_messages", msgServiceFg }};
starsPerMessageWidth: 226px;
repliesEmptyIcon: icon{{ "chat/large_quickreply", msgServiceFg }}; repliesEmptyIcon: icon{{ "chat/large_quickreply", msgServiceFg }};
greetingEmptyIcon: icon{{ "chat/large_greeting", msgServiceFg }}; greetingEmptyIcon: icon{{ "chat/large_greeting", msgServiceFg }};