2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Don't force LTR direction on texts.

This commit is contained in:
John Preston
2024-08-22 10:41:47 +02:00
parent 24b0b33f1d
commit c131d6637d
10 changed files with 47 additions and 28 deletions

View File

@@ -663,14 +663,22 @@ void PaintRow(
: context.selected
? st::dialogsNameFgOver
: st::dialogsNameFg);
rowName.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
rowName.draw(p, {
.position = rectForName.topLeft(),
.availableWidth = rectForName.width(),
.elisionLines = 1,
});
} else if (hiddenSenderInfo) {
p.setPen(context.active
? st::dialogsNameFgActive
: context.selected
? st::dialogsNameFgOver
: st::dialogsNameFg);
hiddenSenderInfo->nameText().drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
hiddenSenderInfo->nameText().draw(p, {
.position = rectForName.topLeft(),
.availableWidth = rectForName.width(),
.elisionLines = 1,
});
} else {
p.setPen(context.active
? st::dialogsNameFgActive
@@ -681,7 +689,11 @@ void PaintRow(
: (context.selected
? st::dialogsNameFgOver
: st::dialogsNameFg));
rowName.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
rowName.draw(p, {
.position = rectForName.topLeft(),
.availableWidth = rectForName.width(),
.elisionLines = 1,
});
}
}