You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-08-04 21:32:54 +02:00
Fixed issue #428 in FMXTabbedBrowser
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{7AA2E07C-ACFB-4174-A9F1-083E9BB483BC}</ProjectGuid>
|
||||
<ProjectVersion>19.3</ProjectVersion>
|
||||
<ProjectVersion>19.4</ProjectVersion>
|
||||
<FrameworkType>FMX</FrameworkType>
|
||||
<MainSource>FMXTabbedBrowser.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
@@ -280,9 +280,8 @@
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="Win32\Debug\FMXTabbedBrowser.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>FMXTabbedBrowser.exe</RemoteName>
|
||||
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
@@ -296,8 +295,9 @@
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
|
||||
<Platform Name="iOSSimulator">
|
||||
<DeployFile LocalName="Win32\Debug\FMXTabbedBrowser.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>FMXTabbedBrowser.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
@@ -1382,17 +1382,17 @@
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
</Deployment>
|
||||
<Platforms>
|
||||
<Platform value="Android">False</Platform>
|
||||
|
@@ -93,7 +93,7 @@ type
|
||||
|
||||
function GetParentForm : TCustomForm;
|
||||
function GetParentTab : TTabItem;
|
||||
function GetFMXWindowParentRect : System.Types.TRect;
|
||||
function GetFMXWindowParentRect : TRectF;
|
||||
procedure CreateFMXWindowParent;
|
||||
|
||||
public
|
||||
@@ -140,17 +140,18 @@ begin
|
||||
FMXWindowParent := nil;
|
||||
end;
|
||||
|
||||
function TBrowserFrame.GetFMXWindowParentRect : System.Types.TRect;
|
||||
function TBrowserFrame.GetFMXWindowParentRect : TRectF;
|
||||
var
|
||||
TempRect : TRectF;
|
||||
TempPoint : TPointF;
|
||||
TempScale : single;
|
||||
begin
|
||||
TempScale := FMXChromium1.ScreenScale;
|
||||
TempRect := WindowParentLay.AbsoluteRect;
|
||||
Result.Left := round(TempRect.Left * TempScale);
|
||||
Result.Top := round(TempRect.Top * TempScale);
|
||||
Result.Right := round(TempRect.Right * TempScale) - 1;
|
||||
Result.Bottom := round(TempREct.Bottom * TempScale) - 1;
|
||||
TempScale := FMXChromium1.ScreenScale;
|
||||
TempPoint := LocalToAbsolute(WindowParentLay.Position.Point);
|
||||
Result.Left := TempPoint.x;
|
||||
Result.Top := TempPoint.y;
|
||||
Result.Right := TempPoint.x + (WindowParentLay.Width * TempScale);
|
||||
Result.Bottom := TempPoint.y + (WindowParentLay.Height * TempScale);
|
||||
end;
|
||||
|
||||
procedure TBrowserFrame.ReloadBtnClick(Sender: TObject);
|
||||
@@ -161,7 +162,7 @@ end;
|
||||
procedure TBrowserFrame.ResizeBrowser;
|
||||
begin
|
||||
if (FMXWindowParent <> nil) then
|
||||
FMXWindowParent.SetBounds(GetFMXWindowParentRect);
|
||||
FMXWindowParent.SetBoundsF(GetFMXWindowParentRect);
|
||||
end;
|
||||
|
||||
procedure TBrowserFrame.ShowBrowser;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 409,
|
||||
"InternalVersion" : 410,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "103.0.8.0"
|
||||
}
|
||||
|
Reference in New Issue
Block a user