Use dedicated color for archive title.

This commit is contained in:
John Preston 2019-05-08 11:07:21 +03:00
parent a0e2a925ee
commit 4f65d0469c
3 changed files with 8 additions and 0 deletions

View File

@ -193,6 +193,7 @@ dialogsSentIconFg: #5dc452; // chat list sent message tick / double tick icon
dialogsUnreadBg: windowBgActive; // chat list unread badge background for not muted chat
dialogsUnreadBgMuted: #bbbbbb; // chat list unread badge background for muted chat
dialogsUnreadFg: windowFgActive; // chat list unread badge text
dialogsArchiveFg: #525252 | dialogsNameFg; // chat list archive name text
dialogsBgOver: windowBgOver; // chat list background with mouse over
dialogsNameFgOver: windowBoldFgOver; // chat list name text with mouse over
@ -208,6 +209,7 @@ dialogsSentIconFgOver: dialogsSentIconFg; // chat list sent message tick / doubl
dialogsUnreadBgOver: dialogsUnreadBg; // chat list unread badge background for not muted chat with mouse over
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted; // chat list unread badge background for muted chat with mouse over
dialogsUnreadFgOver: dialogsUnreadFg; // chat list unread badge text with mouse over
dialogsArchiveFgOver: #525252 | dialogsNameFgOver; // chat list archive name text
dialogsBgActive: #419fd9; // chat list background for current (active) chat
dialogsNameFgActive: windowFgActive; // chat list name text for current (active) chat

View File

@ -424,6 +424,12 @@ void paintRow(
} else if (hiddenSenderInfo) {
hiddenSenderInfo->nameText.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
} else {
const auto nameFg = active
? st::dialogsNameFgActive
: (selected
? st::dialogsArchiveFgOver
: st::dialogsArchiveFg);
p.setPen(nameFg);
p.setFont(st::msgNameFont);
auto text = entry->chatListName(); // TODO feed name with emoji
auto textWidth = st::msgNameFont->width(text);