Improve polls layout.

This commit is contained in:
John Preston 2020-01-21 14:21:04 +03:00
parent 4346aecb61
commit d5bf742912
1 changed files with 5 additions and 4 deletions

View File

@ -963,11 +963,12 @@ void Poll::paintFilling(
const auto &icon = (chosen && !correct)
? st::historyPollChoiceWrong
: st::historyPollChoiceRight;
const auto cleft = aleft - st::historyPollPercentSkip - icon.width();
const auto ctop = ftop - (icon.height() - thickness) / 2;
p.drawEllipse(aleft, ctop, icon.width(), icon.height());
icon.paint(p, aleft, ctop, width);
barleft += icon.width() - radius;
barwidth -= icon.width() - radius;
p.drawEllipse(cleft, ctop, icon.width(), icon.height());
icon.paint(p, cleft, ctop, width);
//barleft += icon.width() - radius;
//barwidth -= icon.width() - radius;
}
if (barwidth > 0) {
p.drawRoundedRect(barleft, ftop, barwidth, thickness, radius, radius);