fix: smoothScrollingNewMessages sometimes hiding messages (#4028)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user