mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
Return chat type icons.
This commit is contained in:
parent
5c301353ec
commit
b61e3b580d
3 changed files with 12 additions and 3 deletions
|
@ -407,9 +407,6 @@ dialogsLockIcon: ThreeStateIcon {
|
|||
active: icon {{ "emoji/premium_lock", dialogsUnreadBgMutedActive, point(4px, 0px) }};
|
||||
}
|
||||
|
||||
dialogsVerifiedBg: icon{{ "dialogs/dialogs_verified_star", dialogsVerifiedIconBg }};
|
||||
dialogsVerifiedFg: icon{{ "dialogs/dialogs_verified_check", dialogsVerifiedIconFg }};
|
||||
dialogsVerifiedPadding: margins(0px, 3px, 0px, 0px);
|
||||
dialogsVerifiedColors: VerifiedBadge {
|
||||
height: 20px;
|
||||
bg: dialogsVerifiedIconBg;
|
||||
|
|
|
@ -1390,6 +1390,11 @@ void InnerWidget::paintPeerSearchResult(
|
|||
const auto position = rectForName.topLeft();
|
||||
const auto skip = result->badge.drawVerified(p, position, st);
|
||||
rectForName.setLeft(position.x() + skip + st::dialogsChatTypeSkip);
|
||||
} else if (const auto chatTypeIcon = Ui::ChatTypeIcon(peer, context)) {
|
||||
chatTypeIcon->paint(p, rectForName.topLeft(), context.width);
|
||||
rectForName.setLeft(rectForName.left()
|
||||
+ chatTypeIcon->width()
|
||||
+ st::dialogsChatTypeSkip);
|
||||
}
|
||||
const auto badgeWidth = result->badge.drawGetWidth(
|
||||
p,
|
||||
|
|
|
@ -460,6 +460,13 @@ void PaintRow(
|
|||
const auto position = rectForName.topLeft();
|
||||
const auto skip = rowBadge.drawVerified(p, position, st);
|
||||
rectForName.setLeft(position.x() + skip + st::dialogsChatTypeSkip);
|
||||
} else if (from) {
|
||||
if (const auto chatTypeIcon = ChatTypeIcon(from, context)) {
|
||||
chatTypeIcon->paint(p, rectForName.topLeft(), context.width);
|
||||
rectForName.setLeft(rectForName.left()
|
||||
+ chatTypeIcon->width()
|
||||
+ st::dialogsChatTypeSkip);
|
||||
}
|
||||
}
|
||||
auto texttop = context.st->textTop;
|
||||
if (const auto folder = entry->asFolder()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue