From de0b79aee80a19332d032ba4a3165c120a4e72f2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 17 Jul 2023 11:48:27 +0400 Subject: [PATCH] Use larger skips in segments to allow up to 50. --- Telegram/SourceFiles/ui/effects/round_checkbox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/ui/effects/round_checkbox.cpp b/Telegram/SourceFiles/ui/effects/round_checkbox.cpp index 8a6b7f4c2..a31eb708e 100644 --- a/Telegram/SourceFiles/ui/effects/round_checkbox.cpp +++ b/Telegram/SourceFiles/ui/effects/round_checkbox.cpp @@ -418,11 +418,12 @@ void RoundImageCheckbox::paint(Painter &p, int x, int y, int outerWidth) const { } else { const auto small = 160; const auto full = arc::kFullLength; - const auto separator = (full > 2 * small * segments) + const auto separator = (full > 1.1 * small * segments) ? small - : full / (segments * 2); + : full / (segments * 1.1); const auto left = full - (separator * segments); const auto length = left / float64(segments); + auto start = 0. + (arc::kQuarterLength + (separator / 2)); for (const auto &segment : ranges::views::reverse(_segments)) { p.setPen(QPen(