Fix votes count in RTL languages.

This commit is contained in:
John Preston 2018-12-23 20:42:32 +04:00
parent a142a2717c
commit 4d495b8d7c

View file

@ -425,7 +425,14 @@ void HistoryPoll::draw(Painter &p, const QRect &r, TextSelection selection, Time
if (!_totalVotesLabel.isEmpty()) {
tshift += st::msgPadding.bottom();
p.setPen(regular);
_totalVotesLabel.drawLeftElided(p, padding.left(), tshift, paintw, width());
_totalVotesLabel.drawLeftElided(
p,
padding.left(),
tshift,
std::min(
_totalVotesLabel.maxWidth(),
paintw - _parent->infoWidth()),
width());
}
}