mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed "jump to bottom" now disapearing after click
This commit is contained in:
parent
a51735baae
commit
285c72a83d
2 changed files with 6 additions and 7 deletions
|
@ -45,7 +45,6 @@ ChannelView::ChannelView(BaseWidget *parent)
|
|||
this->scrollBar.getCurrentValueChanged().connect([this] {
|
||||
// Whenever the scrollbar value has been changed, re-render the ChatWidgetView
|
||||
this->layoutMessages();
|
||||
|
||||
this->goToBottom->setVisible(this->scrollBar.isVisible() && !this->scrollBar.isAtBottom());
|
||||
|
||||
this->queueUpdate();
|
||||
|
@ -93,13 +92,13 @@ ChannelView::~ChannelView()
|
|||
|
||||
void ChannelView::queueUpdate()
|
||||
{
|
||||
if (this->updateTimer.isActive()) {
|
||||
this->updateQueued = true;
|
||||
}
|
||||
// if (this->updateTimer.isActive()) {
|
||||
// this->updateQueued = true;
|
||||
// }
|
||||
|
||||
update();
|
||||
|
||||
this->updateTimer.start();
|
||||
// this->updateTimer.start();
|
||||
}
|
||||
|
||||
void ChannelView::layoutMessages()
|
||||
|
|
|
@ -130,19 +130,19 @@ void ScrollBar::setDesiredValue(qreal value, bool animated)
|
|||
// }
|
||||
this->currentValueAnimation.setEndValue(value);
|
||||
this->smoothScrollingOffset = 0;
|
||||
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
|
||||
this->currentValueAnimation.start();
|
||||
} else {
|
||||
if (this->currentValueAnimation.state() != QPropertyAnimation::Running) {
|
||||
this->smoothScrollingOffset = 0;
|
||||
this->desiredValue = value;
|
||||
this->currentValueAnimation.stop();
|
||||
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
|
||||
setCurrentValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
|
||||
|
||||
this->smoothScrollingOffset = 0;
|
||||
this->desiredValue = value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue