2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 08:05:12 +00:00

Add a distinct forum icon in chats list.

This commit is contained in:
John Preston
2022-10-25 16:40:54 +04:00
parent 76330eaaa6
commit 97d8aa0a0d
8 changed files with 38 additions and 19 deletions

View File

@@ -859,7 +859,9 @@ void InnerWidget::paintPeerSearchResult(
// draw chat icon
if (const auto chatTypeIcon = Ui::ChatTypeIcon(peer, context)) {
chatTypeIcon->paint(p, rectForName.topLeft(), context.width);
rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip);
rectForName.setLeft(rectForName.left()
+ chatTypeIcon->width()
+ st::dialogsChatTypeSkip);
}
const auto badgeWidth = result->badge.drawGetWidth(
p,
@@ -987,7 +989,9 @@ void InnerWidget::paintSearchInFilter(
st::semiboldFont->height);
if (icon) {
icon->paint(p, rectForName.topLeft(), width());
rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip);
rectForName.setLeft(rectForName.left()
+ icon->width()
+ st::dialogsChatTypeSkip);
}
p.setPen(savedPen);
text.drawLeftElided(