From d0d240136ed1c09c80361d11f2472252768a8a22 Mon Sep 17 00:00:00 2001 From: nerix Date: Wed, 27 Dec 2023 16:50:04 +0100 Subject: [PATCH] fix: Add check for tall messages (#5045) --- CHANGELOG.md | 2 +- src/widgets/helper/ChannelView.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 151ac959..0c2bd123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,7 +99,7 @@ - Dev: BREAKING: Replace custom `import()` with normal Lua `require()`. (#5014) - Dev: Fixed most compiler warnings. (#5028) - Dev: Added the ability to show `ChannelView`s without a `Split`. (#4747) -- Dev: Channels without any animated elements on screen will skip updates from the GIF timer. (#5042, #5043) +- Dev: Channels without any animated elements on screen will skip updates from the GIF timer. (#5042, #5043, #5045) ## 2.4.6 diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index 6978e361..003fae9f 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -1501,7 +1501,9 @@ void ChannelView::drawMessages(QPainter &painter, const QRect &area) ctx.isLastReadMessage = false; } - if (areaContainsY(ctx.y) || areaContainsY(ctx.y + layout->getHeight())) + if (areaContainsY(ctx.y) || + areaContainsY(ctx.y + layout->getHeight()) || + (ctx.y < area.y() && layout->getHeight() > area.height())) { auto paintResult = layout->paint(ctx); if (paintResult.hasAnimatedElements)