Improve polls layout.

This commit is contained in:
John Preston 2020-01-21 14:21:04 +03:00
parent 4346aecb61
commit d5bf742912

View File

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