diff --git a/CHANGELOG.md b/CHANGELOG.md index b66ea03ce..e08fc631a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - Bugfix: Mentions of "You" in timeouts will link to your own user now instead of the user "You". (#3922) - Bugfix: Fixed emoji popup not being shown in IRC channels (#4021) - Bugfix: Fixed non-global FrankerFaceZ emotes from being loaded as global emotes. (#3921) +- Bugfix: Fixed `Smooth scrolling on new messages` setting sometimes hiding messages. (#4028) - Dev: Removed official support for QMake. (#3839, #3883) - Dev: Rewrote LimitedQueue (#3798) - Dev: Overhauled highlight system by moving all checks into a Controller allowing for easier tests. (#3399, #3801, #3835) diff --git a/src/widgets/Scrollbar.cpp b/src/widgets/Scrollbar.cpp index df4100977..7fb44f49e 100644 --- a/src/widgets/Scrollbar.cpp +++ b/src/widgets/Scrollbar.cpp @@ -120,7 +120,7 @@ void Scrollbar::setDesiredValue(qreal value, bool animated) value = std::max(this->minimum_, std::min(this->maximum_ - this->largeChange_, value)); - if (std::abs(this->desiredValue_ + this->smoothScrollingOffset_ - value) > + if (std::abs(this->currentValue_ + this->smoothScrollingOffset_ - value) > 0.0001) { if (animated) @@ -142,8 +142,12 @@ void Scrollbar::setDesiredValue(qreal value, bool animated) } else { - if (this->currentValueAnimation_.state() != + if (this->currentValueAnimation_.state() == QPropertyAnimation::Running) + { + this->currentValueAnimation_.setEndValue(value); + } + else { this->smoothScrollingOffset_ = 0; this->desiredValue_ = value;