lcl: formatting

git-svn-id: trunk@28173 -
This commit is contained in:
paul 2010-11-10 06:32:07 +00:00
parent 9bd782a63e
commit 3a9c1584fa

View File

@ -2161,24 +2161,27 @@ var
ParentForm: TCustomForm;
DC: HDC;
begin
if FPixelsPerInch=0 then begin
if Parent<>nil then begin
if FPixelsPerInch = 0 then
begin
if Assigned(Parent) then
begin
ParentForm := GetParentForm(Self);
if ParentForm<>nil then begin
if Assigned(ParentForm) then
FPixelsPerInch := ParentForm.PixelsPerInch;
end;
end;
if FPixelsPerInch<=0 then begin
if HandleAllocated then begin
if FPixelsPerInch <= 0 then
begin
if HandleAllocated then
begin
DC := GetDC(Handle);
FPixelsPerInch := GetDeviceCaps(DC, LOGPIXELSX);
ReleaseDC(Handle, DC);
end else begin
end
else
FPixelsPerInch := Screen.PixelsPerInch;
end;
end;
end;
Result := FPixelsPerInch;
end;