mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 05:55:54 +02:00
lcl: formatting
git-svn-id: trunk@28173 -
This commit is contained in:
parent
9bd782a63e
commit
3a9c1584fa
@ -2161,24 +2161,27 @@ var
|
|||||||
ParentForm: TCustomForm;
|
ParentForm: TCustomForm;
|
||||||
DC: HDC;
|
DC: HDC;
|
||||||
begin
|
begin
|
||||||
if FPixelsPerInch=0 then begin
|
if FPixelsPerInch = 0 then
|
||||||
if Parent<>nil then begin
|
begin
|
||||||
|
if Assigned(Parent) then
|
||||||
|
begin
|
||||||
ParentForm := GetParentForm(Self);
|
ParentForm := GetParentForm(Self);
|
||||||
if ParentForm<>nil then begin
|
if Assigned(ParentForm) then
|
||||||
FPixelsPerInch := ParentForm.PixelsPerInch;
|
FPixelsPerInch := ParentForm.PixelsPerInch;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
if FPixelsPerInch<=0 then begin
|
if FPixelsPerInch <= 0 then
|
||||||
if HandleAllocated then begin
|
begin
|
||||||
|
if HandleAllocated then
|
||||||
|
begin
|
||||||
DC := GetDC(Handle);
|
DC := GetDC(Handle);
|
||||||
FPixelsPerInch := GetDeviceCaps(DC, LOGPIXELSX);
|
FPixelsPerInch := GetDeviceCaps(DC, LOGPIXELSX);
|
||||||
ReleaseDC(Handle, DC);
|
ReleaseDC(Handle, DC);
|
||||||
end else begin
|
end
|
||||||
|
else
|
||||||
FPixelsPerInch := Screen.PixelsPerInch;
|
FPixelsPerInch := Screen.PixelsPerInch;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
Result := FPixelsPerInch;
|
Result := FPixelsPerInch;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user