[Visual] Archive icon for collapsed mode

This commit is contained in:
Eric Kotato 2022-09-11 06:14:49 +03:00
parent 1a5214e94e
commit d6414f2920

View file

@ -1340,7 +1340,7 @@ void PaintCollapsedRow(
const auto narrow = (fullWidth <= smallWidth);
const auto unreadTop = (st::dialogsImportantBarHeight - st::dialogsUnreadHeight) / 2;
if (!narrow || !folder) {
if (!folder) {
p.setFont(st::semiboldFont);
p.setPen(st::dialogsNameFg);
@ -1351,6 +1351,26 @@ void PaintCollapsedRow(
? ((fullWidth - st::semiboldFont->width(text)) / 2)
: st::dialogsPadding.x();
p.drawText(left, textBaseline, text);
} else if (!narrow) {
const auto textBaseline = unreadTop
+ (st::dialogsUnreadHeight - st::dialogsUnreadFont->height) / 2
+ st::dialogsUnreadFont->ascent;
const auto left = st::dialogsPadding.x();
const auto textLeft = left * 2 + st::dialogsUnreadHeight;
folder->paintUserpicLeft(
p,
row.userpicView(),
left,
unreadTop,
fullWidth,
st::dialogsUnreadHeight);
p.setFont(st::semiboldFont);
p.setPen(st::dialogsNameFg);
p.drawText(textLeft, textBaseline, text);
} else {
folder->paintUserpicLeft(
p,