mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix inverse zoom factors
This commit is contained in:
parent
55bbbaf049
commit
6a87677273
1 changed files with 7 additions and 2 deletions
|
@ -697,10 +697,15 @@ void Plot::wheelEvent(QWheelEvent *event) {
|
|||
x += GraphStart;
|
||||
// event->angleDelta doesn't exist in QT4, both exist in 5.12.8 and 5.14.2 and event->delta doesn't exist in 5.15.0
|
||||
#if QT_VERSION >= 0x050d00
|
||||
Zoom(1.0 - (float)event->angleDelta().y() / (120 / zoom_offset), x);
|
||||
float delta = event->angleDelta().y();
|
||||
#else
|
||||
Zoom(1.0 - (float)event->delta() / (120 / zoom_offset), x);
|
||||
float delta = event->delta();
|
||||
#endif
|
||||
if (delta < 0) {
|
||||
Zoom(1.0 - (float)delta / (120 / zoom_offset), x);
|
||||
} else {
|
||||
Zoom(1.0 / (1.0 + (float)delta / (120 / zoom_offset)), x);
|
||||
}
|
||||
} else {
|
||||
#if QT_VERSION >= 0x050d00
|
||||
Move(PageWidth * (-(float)event->angleDelta().y() / (120 / move_offset)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue