1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

WebScrollBar: Make sure not to accidentally scroll

Closes #2211
This commit is contained in:
David Rosca 2017-02-13 21:13:30 +01:00
parent bcf824dce2
commit fe0ae53653

View File

@ -45,6 +45,8 @@ void WebScrollBar::updateValues(const QSize &viewport)
int newValue; int newValue;
m_blockScrolling = true;
if (orientation() == Qt::Vertical) { if (orientation() == Qt::Vertical) {
setFixedHeight(m_view->height() - (m_view->height() - viewport.height()) * devicePixelRatioF()); setFixedHeight(m_view->height() - (m_view->height() - viewport.height()) * devicePixelRatioF());
move(m_view->width() - width(), 0); move(m_view->width() - width(), 0);
@ -60,10 +62,10 @@ void WebScrollBar::updateValues(const QSize &viewport)
} }
if (!isSliderDown()) { if (!isSliderDown()) {
m_blockScrolling = true;
setValue(newValue); setValue(newValue);
m_blockScrolling = false;
} }
m_blockScrolling = false;
} }
void WebScrollBar::performScroll() void WebScrollBar::performScroll()