1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Improved functions to read the screen scale in FMX

Fixed FMXExternalPumpBrowser2 initialization issue in Linux
This commit is contained in:
salvadordf
2022-06-26 17:53:54 +02:00
parent 1239c09282
commit 63d5156cec
7 changed files with 68 additions and 8 deletions

View File

@@ -417,9 +417,12 @@ begin
{$ENDIF}
{$IFDEF LINUX}
// TODO: Get the scale of the screen where the parent form is located in FMXLinux
Result := False;
aResultScale := 1;
if (Screen.DisplayCount = 1) then
aResultScale := Screen.Displays[0].Scale
else
aResultScale := Screen.DisplayFromForm(GetParentForm).Scale;
Result := True;
{$ENDIF}
{$IFDEF MACOS}