mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Fix elision of localized Verification Codes name.
This commit is contained in:
parent
a1aa315187
commit
199e7a1d46
1 changed files with 6 additions and 6 deletions
|
@ -705,11 +705,11 @@ void PaintRow(
|
|||
}
|
||||
|
||||
p.setFont(st::semiboldFont);
|
||||
const auto paintPeerBadge = [&] {
|
||||
const auto paintPeerBadge = [&](int rowNameWidth) {
|
||||
const auto badgeWidth = rowBadge.drawGetWidth(p, {
|
||||
.peer = from,
|
||||
.rectForName = rectForName,
|
||||
.nameWidth = rowName.maxWidth(),
|
||||
.nameWidth = rowNameWidth,
|
||||
.outerWidth = context.width,
|
||||
.verified = (context.active
|
||||
? &st::dialogsVerifiedIconActive
|
||||
|
@ -742,9 +742,6 @@ void PaintRow(
|
|||
| Flag::VerifyCodes
|
||||
| Flag::HiddenAuthor
|
||||
| Flag::MyNotes)) {
|
||||
if (!context.search && (flags & Flag::VerifyCodes)) {
|
||||
paintPeerBadge();
|
||||
}
|
||||
auto text = (flags & Flag::SavedMessages)
|
||||
? tr::lng_saved_messages(tr::now)
|
||||
: (flags & Flag::RepliesMessages)
|
||||
|
@ -755,6 +752,9 @@ void PaintRow(
|
|||
? tr::lng_my_notes(tr::now)
|
||||
: tr::lng_hidden_author_messages(tr::now);
|
||||
const auto textWidth = st::semiboldFont->width(text);
|
||||
if (!context.search && (flags & Flag::VerifyCodes)) {
|
||||
paintPeerBadge(textWidth);
|
||||
}
|
||||
if (textWidth > rectForName.width()) {
|
||||
text = st::semiboldFont->elided(text, rectForName.width());
|
||||
}
|
||||
|
@ -770,7 +770,7 @@ void PaintRow(
|
|||
text);
|
||||
} else if (from) {
|
||||
if ((history || sublist) && !context.search) {
|
||||
paintPeerBadge();
|
||||
paintPeerBadge(rowName.maxWidth());
|
||||
}
|
||||
p.setPen(context.active
|
||||
? st::dialogsNameFgActive
|
||||
|
|
Loading…
Add table
Reference in a new issue