mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
p.setFont(st::semiboldFont);
|
||||||
const auto paintPeerBadge = [&] {
|
const auto paintPeerBadge = [&](int rowNameWidth) {
|
||||||
const auto badgeWidth = rowBadge.drawGetWidth(p, {
|
const auto badgeWidth = rowBadge.drawGetWidth(p, {
|
||||||
.peer = from,
|
.peer = from,
|
||||||
.rectForName = rectForName,
|
.rectForName = rectForName,
|
||||||
.nameWidth = rowName.maxWidth(),
|
.nameWidth = rowNameWidth,
|
||||||
.outerWidth = context.width,
|
.outerWidth = context.width,
|
||||||
.verified = (context.active
|
.verified = (context.active
|
||||||
? &st::dialogsVerifiedIconActive
|
? &st::dialogsVerifiedIconActive
|
||||||
|
@ -742,9 +742,6 @@ void PaintRow(
|
||||||
| Flag::VerifyCodes
|
| Flag::VerifyCodes
|
||||||
| Flag::HiddenAuthor
|
| Flag::HiddenAuthor
|
||||||
| Flag::MyNotes)) {
|
| Flag::MyNotes)) {
|
||||||
if (!context.search && (flags & Flag::VerifyCodes)) {
|
|
||||||
paintPeerBadge();
|
|
||||||
}
|
|
||||||
auto text = (flags & Flag::SavedMessages)
|
auto text = (flags & Flag::SavedMessages)
|
||||||
? tr::lng_saved_messages(tr::now)
|
? tr::lng_saved_messages(tr::now)
|
||||||
: (flags & Flag::RepliesMessages)
|
: (flags & Flag::RepliesMessages)
|
||||||
|
@ -755,6 +752,9 @@ void PaintRow(
|
||||||
? tr::lng_my_notes(tr::now)
|
? tr::lng_my_notes(tr::now)
|
||||||
: tr::lng_hidden_author_messages(tr::now);
|
: tr::lng_hidden_author_messages(tr::now);
|
||||||
const auto textWidth = st::semiboldFont->width(text);
|
const auto textWidth = st::semiboldFont->width(text);
|
||||||
|
if (!context.search && (flags & Flag::VerifyCodes)) {
|
||||||
|
paintPeerBadge(textWidth);
|
||||||
|
}
|
||||||
if (textWidth > rectForName.width()) {
|
if (textWidth > rectForName.width()) {
|
||||||
text = st::semiboldFont->elided(text, rectForName.width());
|
text = st::semiboldFont->elided(text, rectForName.width());
|
||||||
}
|
}
|
||||||
|
@ -770,7 +770,7 @@ void PaintRow(
|
||||||
text);
|
text);
|
||||||
} else if (from) {
|
} else if (from) {
|
||||||
if ((history || sublist) && !context.search) {
|
if ((history || sublist) && !context.search) {
|
||||||
paintPeerBadge();
|
paintPeerBadge(rowName.maxWidth());
|
||||||
}
|
}
|
||||||
p.setPen(context.active
|
p.setPen(context.active
|
||||||
? st::dialogsNameFgActive
|
? st::dialogsNameFgActive
|
||||||
|
|
Loading…
Add table
Reference in a new issue