diff --git a/.gitattributes b/.gitattributes index f46fe68618..d1c4f5aaa4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3268,7 +3268,6 @@ lcl/interfaces/nogui/noguiint.pp svneol=native#text/plain lcl/interfaces/qt/README.txt svneol=native#text/plain lcl/interfaces/qt/interfaces.pp svneol=native#text/pascal lcl/interfaces/qt/qt4.pas svneol=native#text/plain -lcl/interfaces/qt/qtcallback.inc svneol=native#text/pascal lcl/interfaces/qt/qtcaret.pas svneol=native#text/pascal lcl/interfaces/qt/qtdefines.inc svneol=native#text/pascal lcl/interfaces/qt/qtint.pp svneol=native#text/pascal diff --git a/lcl/interfaces/gtk/gtkcallback.inc b/lcl/interfaces/gtk/gtkcallback.inc index 63037b1031..dbb0b7fd6f 100644 --- a/lcl/interfaces/gtk/gtkcallback.inc +++ b/lcl/interfaces/gtk/gtkcallback.inc @@ -1221,7 +1221,7 @@ end; procedure DeliverMouseDownMessage(widget: PGtkWidget; event : pgdkEventButton; AWinControl: TWinControl); const - WHEEL_DELTA : array[Boolean] of Integer = (-1, 1); + WHEEL_DELTA : array[Boolean] of Integer = (-120, 120); var MessI : TLMMouse; MessE : TLMMouseEvent; diff --git a/lcl/interfaces/gtk2/gtk2callback.inc b/lcl/interfaces/gtk2/gtk2callback.inc index a4ca03318a..3a5e4853d0 100644 --- a/lcl/interfaces/gtk2/gtk2callback.inc +++ b/lcl/interfaces/gtk2/gtk2callback.inc @@ -134,8 +134,8 @@ begin FillChar(MessE,SizeOf(MessE),0); MessE.Msg := LM_MOUSEWHEEL; case event^.direction of - GDK_SCROLL_UP: MessE.WheelDelta := 1; - GDK_SCROLL_DOWN: MessE.WheelDelta := -1; + GDK_SCROLL_UP: MessE.WheelDelta := 120; + GDK_SCROLL_DOWN: MessE.WheelDelta := -120; else exit; end; diff --git a/lcl/interfaces/qt/qtcallback.inc b/lcl/interfaces/qt/qtcallback.inc deleted file mode 100644 index c28755369b..0000000000 --- a/lcl/interfaces/qt/qtcallback.inc +++ /dev/null @@ -1,81 +0,0 @@ -{ - ***************************************************************************** - * * - * This file is part of the Lazarus Component Library (LCL) * - * * - * See the file COPYING.modifiedLGPL, included in this distribution, * - * for details about the copyright. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * * - ***************************************************************************** -} - -{------------------------------------------------------------------------------ - Procedure: DeliverMessage - Params: Message: thje message to process - Returns: True if handled - - Generic function whih calls the WindowProc if defined, otherwise the - dispatcher - ------------------------------------------------------------------------------} -function DeliverMessage(const Target: Pointer; var Message): Boolean; -begin -{ - if TObject(Target) is TControl then - begin - TControl(Target).WindowProc(TLMessage(Message)); - end - else - begin - TObject(Target).Dispatch(TLMessage(Message)); - end; - Result := TLMessage(Message).Result = 0;} -end; - - - -{*************************************************************} -{ callback routines } -{*************************************************************} - -procedure QTMousePressedEvent(qwid,button,x,y,state: integer);cdecl; -{var - MessE : TLMMouseEvent; - Data: pointer; -} -begin -{ Data := GetData(qwid); - - EventTrace('Mouse button Press', data); - MessE.Button := button; - case button of - 1 : MessE.Msg := LM_LBUTTONDOWN; - 2 : MessE.Msg := LM_MBUTTONDOWN; - 3 : MessE.Msg := LM_RBUTTONDOWN; - else MessE.Msg := LM_NULL; - end; - // MessE.WheelDelta := 1; - //MessE.State := state; - MessE.X := RoundToInt(x); - MessE.Y := RoundToInt(y); - - - if MessE.Msg <> LM_NULL then - DeliverMessage(Data, MessE); -} -end; - -{* -procedure QTMousePressedEvent(qwid,button,x,y,state: integer);cdecl; -begin - - -DebugLn('fired press event widget' + IntToStr(qwid)); -DebugLn('mouse button=' + IntToStr(button)); -DebugLn('mouse x=' + IntToStr(x)); -DebugLn('mouse y=' + IntToStr(y)); -DebugLn('mouse state=' + IntToStr(state)); -end; *} \ No newline at end of file diff --git a/lcl/interfaces/qt/qtint.pp b/lcl/interfaces/qt/qtint.pp index 61b23a8509..d5b345268e 100644 --- a/lcl/interfaces/qt/qtint.pp +++ b/lcl/interfaces/qt/qtint.pp @@ -265,7 +265,6 @@ end; {$I qtobject.inc} {$I qtwinapi.inc} {$I qtlclintf.inc} -{.$I qtcallback.inc} initialization diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 53c8588c27..97cb0fb4b4 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -2129,7 +2129,6 @@ var Msg: TLMMouseEvent; MousePos: TQtPoint; begin - WriteLn(LCLObject.ClassName); FillChar(Msg, SizeOf(Msg), #0); MousePos := QWheelEvent_Pos(QWheelEventH(Event))^; @@ -2143,7 +2142,7 @@ begin Msg.X := SmallInt(MousePos.X); Msg.Y := SmallInt(MousePos.Y); - Msg.WheelDelta := QWheelEvent_delta(QWheelEventH(Event)) div 120; + Msg.WheelDelta := QWheelEvent_delta(QWheelEventH(Event)); NotifyApplicationUserInput(Msg.Msg); DeliverMessage(Msg);