mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 09:05:14 +00:00
Updated TDesktop sources to 2.6
This commit is contained in:
@@ -627,6 +627,7 @@ void paintRow(
|
||||
sendStateIcon->paint(p, rectForName.topLeft() + QPoint(rectForName.width(), 0), fullWidth);
|
||||
}
|
||||
|
||||
p.setFont(st::msgNameFont);
|
||||
if (flags & (Flag::SavedMessages | Flag::RepliesMessages)) {
|
||||
auto text = (flags & Flag::SavedMessages)
|
||||
? tr::lng_saved_messages(tr::now)
|
||||
@@ -635,7 +636,6 @@ void paintRow(
|
||||
if (textWidth > rectForName.width()) {
|
||||
text = st::msgNameFont->elided(text, rectForName.width());
|
||||
}
|
||||
p.setFont(st::msgNameFont);
|
||||
p.setPen(active
|
||||
? st::dialogsNameFgActive
|
||||
: selected
|
||||
@@ -671,15 +671,18 @@ void paintRow(
|
||||
: st::dialogsNameFg);
|
||||
from->nameText().drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
|
||||
} else if (hiddenSenderInfo) {
|
||||
p.setPen(active
|
||||
? st::dialogsNameFgActive
|
||||
: selected
|
||||
? st::dialogsNameFgOver
|
||||
: st::dialogsNameFg);
|
||||
hiddenSenderInfo->nameText.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
|
||||
} else {
|
||||
const auto nameFg = active
|
||||
p.setPen(active
|
||||
? st::dialogsNameFgActive
|
||||
: (selected
|
||||
? st::dialogsArchiveFgOver
|
||||
: st::dialogsArchiveFg);
|
||||
p.setPen(nameFg);
|
||||
p.setFont(st::msgNameFont);
|
||||
: selected
|
||||
? st::dialogsArchiveFgOver
|
||||
: st::dialogsArchiveFg);
|
||||
auto text = entry->chatListName(); // TODO feed name with emoji
|
||||
auto textWidth = st::msgNameFont->width(text);
|
||||
if (textWidth > rectForName.width()) {
|
||||
@@ -1038,8 +1041,10 @@ void RowPainter::paint(
|
||||
const auto hiddenSenderInfo = [&]() -> const HiddenSenderInfo* {
|
||||
if (const auto searchChat = row->searchInChat()) {
|
||||
if (const auto peer = searchChat.peer()) {
|
||||
if (peer->isSelf()) {
|
||||
return item->hiddenForwardedInfo();
|
||||
if (const auto forwarded = item->Get<HistoryMessageForwarded>()) {
|
||||
if (peer->isSelf() || forwarded->imported) {
|
||||
return forwarded->hiddenSenderInfo.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user