[Visual] Archive icon for collapsed mode

This commit is contained in:
Eric Kotato 2022-09-11 06:14:49 +03:00 committed by Eric Kotato
parent 0b6e22f85b
commit d01ba62f85

View file

@ -1003,7 +1003,7 @@ void PaintCollapsedRow(
row.paintRipple(p, 0, 0, context.width); row.paintRipple(p, 0, 0, context.width);
const auto unreadTop = (st::dialogsImportantBarHeight - st::dialogsUnreadHeight) / 2; const auto unreadTop = (st::dialogsImportantBarHeight - st::dialogsUnreadHeight) / 2;
if (!context.narrow || !folder) { if (!folder) {
p.setFont(st::semiboldFont); p.setFont(st::semiboldFont);
p.setPen(st::dialogsNameFg); p.setPen(st::dialogsNameFg);
@ -1014,6 +1014,24 @@ void PaintCollapsedRow(
? ((context.width - st::semiboldFont->width(text)) / 2) ? ((context.width - st::semiboldFont->width(text)) / 2)
: context.st->padding.left(); : context.st->padding.left();
p.drawText(left, textBaseline, text); p.drawText(left, textBaseline, text);
} else if (!context.narrow) {
const auto textBaseline = unreadTop
+ (st::dialogsUnreadHeight - st::dialogsUnreadFont->height) / 2
+ st::dialogsUnreadFont->ascent;
const auto left = context.st->padding.left();
const auto textLeft = left * 2 + st::dialogsUnreadHeight;
folder->paintUserpic(
p,
left,
unreadTop,
st::dialogsUnreadHeight);
p.setFont(st::semiboldFont);
p.setPen(st::dialogsNameFg);
p.drawText(textLeft, textBaseline, text);
} else { } else {
folder->paintUserpic( folder->paintUserpic(
p, p,