mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-22 12:34:58 +00:00
feat: adjust wheelEvent speed
This commit is contained in:
parent
3f07c3379e
commit
9efc448089
1 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
#include <cmath>
|
||||
|
||||
#include "inputconvertnormal.h"
|
||||
|
||||
InputConvertNormal::InputConvertNormal(Controller* controller)
|
||||
|
@ -63,10 +65,10 @@ void InputConvertNormal::wheelEvent(const QWheelEvent *from, const QSize& frameS
|
|||
qint32 vScroll = 0;
|
||||
switch (from->orientation()) {
|
||||
case Qt::Horizontal:
|
||||
hScroll = from->delta();
|
||||
hScroll = from->delta() / abs(from->delta()) * 2;
|
||||
break;
|
||||
case Qt::Vertical:
|
||||
vScroll = from->delta();
|
||||
vScroll = from->delta() / abs(from->delta()) * 2;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue