Unscale DirectManipulation values
This commit is contained in:
parent
fb3d00bab0
commit
8c01f3f0fa
1 changed files with 4 additions and 2 deletions
|
|
@ -501,12 +501,14 @@ void WindowHelper::handleDirectManipulationEvent(
|
||||||
::GetCursorPos(&global);
|
::GetCursorPos(&global);
|
||||||
auto local = global;
|
auto local = global;
|
||||||
::ScreenToClient(_handle, &local);
|
::ScreenToClient(_handle, &local);
|
||||||
|
const auto dpi = _dpi.current() ? double(_dpi.current()) : 96.;
|
||||||
|
const auto delta = QPointF(event.delta) / (dpi / 96.);
|
||||||
QWindowSystemInterface::handleWheelEvent(
|
QWindowSystemInterface::handleWheelEvent(
|
||||||
windowHandle,
|
windowHandle,
|
||||||
QPointF(local.x, local.y),
|
QPointF(local.x, local.y),
|
||||||
QPointF(global.x, global.y),
|
QPointF(global.x, global.y),
|
||||||
event.delta,
|
delta.toPoint(),
|
||||||
event.delta * kPixelToAngleDelta,
|
(delta * kPixelToAngleDelta).toPoint(),
|
||||||
LookupModifiers(),
|
LookupModifiers(),
|
||||||
phase,
|
phase,
|
||||||
Qt::MouseEventSynthesizedBySystem);
|
Qt::MouseEventSynthesizedBySystem);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue