From 0172c6e1e30787d433371e369528ff8f55c89b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20D=C3=ADaz=20Fau?= Date: Wed, 6 Mar 2019 15:08:17 +0100 Subject: [PATCH] Fix FMX demos compilation failures with Delphi 10 Seattle and XE7 --- .../FMXExternalPumpBrowser/uFMXApplicationService.pas | 4 ++++ demos/FMXToolBoxBrowser/uChildForm.pas | 11 +---------- demos/FMXToolBoxBrowser/uFMXApplicationService.pas | 4 ++++ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/demos/FMXExternalPumpBrowser/uFMXApplicationService.pas b/demos/FMXExternalPumpBrowser/uFMXApplicationService.pas index 420410b6..2c8ffb02 100644 --- a/demos/FMXExternalPumpBrowser/uFMXApplicationService.pas +++ b/demos/FMXExternalPumpBrowser/uFMXApplicationService.pas @@ -106,7 +106,11 @@ end; function TFMXApplicationService.GetVersionString: string; begin + {$IFDEF DELPHI22_UP} Result := OldFMXApplicationService.GetVersionString; + {$ELSE DELPHI22_UP} + Result := 'unsupported yet'; + {$ENDIF DELPHI22_UP} end; procedure TFMXApplicationService.Run; diff --git a/demos/FMXToolBoxBrowser/uChildForm.pas b/demos/FMXToolBoxBrowser/uChildForm.pas index 3c4f04d1..1bd583ad 100644 --- a/demos/FMXToolBoxBrowser/uChildForm.pas +++ b/demos/FMXToolBoxBrowser/uChildForm.pas @@ -136,18 +136,9 @@ begin end; procedure TChildForm.ResizeChild; -var - TempRect : System.Types.TRect; begin if (FMXWindowParent <> nil) then - begin - TempRect.Top := 0; - TempRect.Left := 0; - TempRect.Right := ClientWidth - 1; - TempRect.Bottom := ClientHeight - 1; - - FMXWindowParent.SetBounds(TempRect); - end; + FMXWindowParent.SetBounds(0, 0, ClientWidth - 1, ClientHeight - 1); end; procedure TChildForm.FMXChromium1AfterCreated(Sender: TObject; const browser: ICefBrowser); diff --git a/demos/FMXToolBoxBrowser/uFMXApplicationService.pas b/demos/FMXToolBoxBrowser/uFMXApplicationService.pas index 6b95c2a0..9431ae83 100644 --- a/demos/FMXToolBoxBrowser/uFMXApplicationService.pas +++ b/demos/FMXToolBoxBrowser/uFMXApplicationService.pas @@ -107,7 +107,11 @@ end; function TFMXApplicationService.GetVersionString: string; begin + {$IFDEF DELPHI22_UP} Result := OldFMXApplicationService.GetVersionString; + {$ELSE DELPHI22_UP} + Result := 'unsupported yet'; + {$ENDIF DELPHI22_UP} end; procedure TFMXApplicationService.Run;