mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-24 12:49:02 +02:00
LCL: Extend horizontal mouse wheel messages for QT and QT5. Issue #32753, patch from AlexeyT.
git-svn-id: trunk@56670 -
This commit is contained in:
parent
9e8a489027
commit
07a192047b
@ -3970,14 +3970,19 @@ begin
|
||||
LastMouse.WinControl := LCLObject;
|
||||
LastMouse.WinHandle := TLCLIntfHandle(Self);
|
||||
LastMouse.MousePos := Point(MousePos.X, MousePos.Y);
|
||||
|
||||
Msg.Msg := LM_MOUSEWHEEL;
|
||||
|
||||
Msg.X := SmallInt(MousePos.X);
|
||||
Msg.Y := SmallInt(MousePos.Y);
|
||||
|
||||
Msg.WheelDelta := SmallInt(QWheelEvent_delta(QWheelEventH(Event)));
|
||||
|
||||
Msg.Msg := LM_MOUSEWHEEL;
|
||||
if QWheelEvent_orientation(QWheelEventH(Event)) = QtHorizontal then
|
||||
begin
|
||||
Msg.Msg := LM_MOUSEHWHEEL;
|
||||
Msg.WheelDelta := -Msg.WheelDelta;
|
||||
end;
|
||||
|
||||
{$IFDEF DARWIN}
|
||||
// LCL expects delta +-120, we must fix it. issue #20888
|
||||
if (ChildOfComplexWidget in [ccwCustomControl, ccwAbstractScrollArea,
|
||||
|
@ -3892,14 +3892,19 @@ begin
|
||||
LastMouse.WinControl := LCLObject;
|
||||
LastMouse.WinHandle := TLCLIntfHandle(Self);
|
||||
LastMouse.MousePos := Point(MousePos.X, MousePos.Y);
|
||||
|
||||
Msg.Msg := LM_MOUSEWHEEL;
|
||||
|
||||
Msg.X := SmallInt(MousePos.X);
|
||||
Msg.Y := SmallInt(MousePos.Y);
|
||||
|
||||
Msg.WheelDelta := SmallInt(QWheelEvent_delta(QWheelEventH(Event)));
|
||||
|
||||
Msg.Msg := LM_MOUSEWHEEL;
|
||||
if QWheelEvent_orientation(QWheelEventH(Event)) = QtHorizontal then
|
||||
begin
|
||||
Msg.Msg := LM_MOUSEHWHEEL;
|
||||
Msg.WheelDelta := -Msg.WheelDelta;
|
||||
end;
|
||||
|
||||
{$IFDEF DARWIN}
|
||||
// LCL expects delta +-120, we must fix it. issue #20888
|
||||
if (ChildOfComplexWidget in [ccwCustomControl, ccwAbstractScrollArea,
|
||||
|
Loading…
Reference in New Issue
Block a user