mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Don't jump by scroll events in stories viewer.
This commit is contained in:
parent
3654c197a9
commit
ce39431beb
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue