[Visual] Archive icon for collapsed mode
This commit is contained in:
parent
58a26528f3
commit
7074e0a436
1 changed files with 19 additions and 1 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue