mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-01-03 10:15:38 +02:00
Fixed touch events in FMX demos with high DPI screens
This commit is contained in:
parent
feaeb772cb
commit
78adeecde2
@ -2,7 +2,7 @@ object FMXExternalPumpBrowserFrm: TFMXExternalPumpBrowserFrm
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Initializing browser. Please wait...'
|
||||
ClientHeight = 534
|
||||
ClientHeight = 633
|
||||
ClientWidth = 800
|
||||
Position = ScreenCenter
|
||||
FormFactor.Width = 320
|
||||
@ -90,7 +90,7 @@ object FMXExternalPumpBrowserFrm: TFMXExternalPumpBrowserFrm
|
||||
Color = claTomato
|
||||
CanFocus = True
|
||||
Size.Width = 800.000000000000000000
|
||||
Size.Height = 501.000000000000000000
|
||||
Size.Height = 600.000000000000000000
|
||||
Size.PlatformDefault = False
|
||||
OnEnter = Panel1Enter
|
||||
OnExit = Panel1Exit
|
||||
|
@ -1051,8 +1051,9 @@ begin
|
||||
TempTouchEvent.type_ := CEF_TET_CANCELLED;
|
||||
|
||||
TempPoint := Panel1.ScreenToClient(TempPenInfo.pointerInfo.ptPixelLocation);
|
||||
TempTouchEvent.x := DeviceToLogical(TempPoint.x, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempTouchEvent.y := DeviceToLogical(TempPoint.y, GlobalCEFApp.DeviceScaleFactor);
|
||||
// TFMXBufferPanel.ScreenToClient applies the scale factor. No need to call DeviceToLogical to set TempTouchEvent.
|
||||
TempTouchEvent.x := TempPoint.x;
|
||||
TempTouchEvent.y := TempPoint.y;
|
||||
|
||||
chrmosr.SendTouchEvent(@TempTouchEvent);
|
||||
{$ENDIF}
|
||||
@ -1101,8 +1102,9 @@ begin
|
||||
TempTouchEvent.type_ := CEF_TET_CANCELLED;
|
||||
|
||||
TempPoint := Panel1.ScreenToClient(TempTouchInfo.pointerInfo.ptPixelLocation);
|
||||
TempTouchEvent.x := DeviceToLogical(TempPoint.x, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempTouchEvent.y := DeviceToLogical(TempPoint.y, GlobalCEFApp.DeviceScaleFactor);
|
||||
// TFMXBufferPanel.ScreenToClient applies the scale factor. No need to call DeviceToLogical to set TempTouchEvent.
|
||||
TempTouchEvent.x := TempPoint.x;
|
||||
TempTouchEvent.y := TempPoint.y;
|
||||
|
||||
chrmosr.SendTouchEvent(@TempTouchEvent);
|
||||
{$ENDIF}
|
||||
|
@ -1048,8 +1048,9 @@ begin
|
||||
TempTouchEvent.type_ := CEF_TET_CANCELLED;
|
||||
|
||||
TempPoint := FMXBufferPanel1.ScreenToClient(TempPenInfo.pointerInfo.ptPixelLocation);
|
||||
TempTouchEvent.x := DeviceToLogical(TempPoint.x, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempTouchEvent.y := DeviceToLogical(TempPoint.y, GlobalCEFApp.DeviceScaleFactor);
|
||||
// TFMXBufferPanel.ScreenToClient applies the scale factor. No need to call DeviceToLogical to set TempTouchEvent.
|
||||
TempTouchEvent.x := TempPoint.x;
|
||||
TempTouchEvent.y := TempPoint.y;
|
||||
|
||||
FMXChromium1.SendTouchEvent(@TempTouchEvent);
|
||||
end;
|
||||
@ -1095,8 +1096,9 @@ begin
|
||||
TempTouchEvent.type_ := CEF_TET_CANCELLED;
|
||||
|
||||
TempPoint := FMXBufferPanel1.ScreenToClient(TempTouchInfo.pointerInfo.ptPixelLocation);
|
||||
TempTouchEvent.x := DeviceToLogical(TempPoint.x, GlobalCEFApp.DeviceScaleFactor);
|
||||
TempTouchEvent.y := DeviceToLogical(TempPoint.y, GlobalCEFApp.DeviceScaleFactor);
|
||||
// TFMXBufferPanel.ScreenToClient applies the scale factor. No need to call DeviceToLogical to set TempTouchEvent.
|
||||
TempTouchEvent.x := TempPoint.x;
|
||||
TempTouchEvent.y := TempPoint.y;
|
||||
|
||||
FMXChromium1.SendTouchEvent(@TempTouchEvent);
|
||||
end;
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 102,
|
||||
"InternalVersion" : 103,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "80.0.4.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user