From 2687a19b1435276e5a998d04b7d47df92e0c8391 Mon Sep 17 00:00:00 2001 From: kukuruzka <60149954+kukuruzka165@users.noreply.github.com> Date: Sun, 25 Feb 2024 18:44:26 +0200 Subject: [PATCH] Improve spoilers at low resolutions --- ui/effects/spoiler_mess.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/effects/spoiler_mess.cpp b/ui/effects/spoiler_mess.cpp index a98bbc3..d4413de 100644 --- a/ui/effects/spoiler_mess.cpp +++ b/ui/effects/spoiler_mess.cpp @@ -25,7 +25,7 @@ namespace Ui { namespace { -constexpr auto kVersion = 1; +constexpr auto kVersion = 2; constexpr auto kFramesPerRow = 10; constexpr auto kImageSpoilerDarkenAlpha = 32; constexpr auto kMaxCacheSize = 5 * 1024 * 1024; @@ -186,7 +186,9 @@ struct Particle { auto hq = PainterHighQualityEnabler(p); p.setPen(Qt::NoPen); p.setBrush(Qt::white); - p.drawRoundedRect(1., 1., width, height, radius, radius); + QPainterPath path; + path.addRoundedRect(1., 1., width, height, radius, radius); + p.drawPath(path); p.end(); return result; }