1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Fixed context menu position in FMX demos using OSR mode in high DPI screens

Fixed a build issue in the SubProcess demo.
This commit is contained in:
salvadordf
2022-06-25 18:19:14 +02:00
parent 7f3e3415ef
commit 676162a41b
9 changed files with 135 additions and 64 deletions

View File

@ -578,8 +578,8 @@ procedure TMainForm.chrmosrGetScreenPoint( Sender : TObject;
var
TempPoint : TPointF;
begin
TempPoint.x := viewX;
TempPoint.y := viewY;
TempPoint.x := LogicalToDevice(viewX, GlobalCEFApp.DeviceScaleFactor);
TempPoint.y := LogicalToDevice(viewY, GlobalCEFApp.DeviceScaleFactor);
// LocalToScreen applies the scale factor. No need to call LogicalToDevice to set TempViewPt.
TempPoint := Panel1.LocalToScreen(TempPoint);
screenX := round(TempPoint.x);