From 673eb1090fc40f9ad93d321047b8b8809b485c89 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 26 Dec 2022 10:47:40 +0400 Subject: [PATCH] Fix a crash and adjust some styles in snowflakes. --- Telegram/SourceFiles/ui/effects/snowflakes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/ui/effects/snowflakes.cpp b/Telegram/SourceFiles/ui/effects/snowflakes.cpp index 9e12a7204..504c912bb 100644 --- a/Telegram/SourceFiles/ui/effects/snowflakes.cpp +++ b/Telegram/SourceFiles/ui/effects/snowflakes.cpp @@ -17,10 +17,10 @@ namespace Ui { namespace { [[nodiscard]] QImage PrepareSnowflake(QBrush brush) { - constexpr auto kPenWidth = 1.5; + constexpr auto kPenWidth = 1.; constexpr auto kTailCount = 6; constexpr auto kAngle = (-M_PI / 2.); - constexpr auto kTailSize = 8.; + constexpr auto kTailSize = 6.; constexpr auto kSubtailPositionRatio = 2 / 3.; constexpr auto kSubtailSize = kTailSize / 3; constexpr auto kSubtailAngle1 = -M_PI / 6.; @@ -95,7 +95,7 @@ Snowflakes::Snowflakes(Fn updateCallback) }) { { const auto from = _deathTime.from + _deathTime.length; - auto r = bytes::vector(from); + auto r = bytes::vector(from + 1); base::RandomFill(r.data(), r.size()); const auto now = crl::now();