mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-04 02:50:36 +00:00
Fix elision of localized Verification Codes name.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user