mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Don't jump by scroll events in stories viewer.
This commit is contained in:
@@ -5065,8 +5065,9 @@ void OverlayWidget::handleKeyPress(not_null<QKeyEvent*> e) {
|
||||
void OverlayWidget::handleWheelEvent(not_null<QWheelEvent*> e) {
|
||||
constexpr auto step = int(QWheelEvent::DefaultDeltasPerStep);
|
||||
|
||||
const auto acceptForJump = (e->source() == Qt::MouseEventNotSynthesized)
|
||||
|| (e->source() == Qt::MouseEventSynthesizedBySystem);
|
||||
const auto acceptForJump = !_stories
|
||||
&& ((e->source() == Qt::MouseEventNotSynthesized)
|
||||
|| (e->source() == Qt::MouseEventSynthesizedBySystem));
|
||||
_verticalWheelDelta += e->angleDelta().y();
|
||||
while (qAbs(_verticalWheelDelta) >= step) {
|
||||
if (_verticalWheelDelta < 0) {
|
||||
|
||||
Reference in New Issue
Block a user