From d5bf742912b7a3edbf3f7725c5201ed68d9302f3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 21 Jan 2020 14:21:04 +0300 Subject: [PATCH] Improve polls layout. --- .../SourceFiles/history/view/media/history_view_poll.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp index a68711ffa..25c7ec555 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp @@ -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);