mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 08:58:23 +02:00
designer: cleanup, formatting
git-svn-id: trunk@21223 -
This commit is contained in:
parent
ee68afcbd3
commit
61ae96cde3
@ -2526,8 +2526,7 @@ begin
|
||||
IconRect := Rect(ItemLeft, ItemTop, ItemRight, ItemBottom);
|
||||
Frame3D(IconRect, 1, bvRaised);
|
||||
Brush.Color := clBtnFace;
|
||||
FillRect(Rect(IconRect.Left, IconRect.Top,
|
||||
IconRect.Right, IconRect.Bottom));
|
||||
FillRect(IconRect);
|
||||
if NonVisualCompBorder > 1 then
|
||||
InflateRect(IconRect, -NonVisualCompBorder + 1, -NonVisualCompBorder + 1);
|
||||
end;
|
||||
|
@ -351,11 +351,12 @@ end;
|
||||
function TDesignerDeviceContext.GetDCSize: TPoint;
|
||||
// returns the DC size
|
||||
begin
|
||||
if not (ddcSizeValid in FFlags) then begin
|
||||
GetDeviceSize(FDC,FDCSize);
|
||||
Include(FFlags,ddcSizeValid);
|
||||
if not (ddcSizeValid in FFlags) then
|
||||
begin
|
||||
GetDeviceSize(DC, FDCSize);
|
||||
Include(FFlags, ddcSizeValid);
|
||||
end;
|
||||
Result:=FDCSize;
|
||||
Result := FDCSize;
|
||||
end;
|
||||
|
||||
function TDesignerDeviceContext.GetFormClientOrigin: TPoint;
|
||||
@ -377,7 +378,7 @@ var
|
||||
begin
|
||||
if not (ddcFormOriginValid in FFlags) then
|
||||
begin
|
||||
if not GetDCOriginRelativeToWindow(FDC, FForm.Handle, FFormOrigin) then
|
||||
if not GetDCOriginRelativeToWindow(DC, FForm.Handle, FFormOrigin) then
|
||||
begin
|
||||
// For some reason we cannot retrieve DC origin. It can happen for exmample
|
||||
// when DC is not controld DC but double buffer DC. Lets use another trick
|
||||
@ -390,7 +391,7 @@ begin
|
||||
end
|
||||
else
|
||||
FFormOrigin := Point(0, 0);
|
||||
if GetWindowOrgEx(FDC, @AControlOrigin) <> 0 then
|
||||
if GetWindowOrgEx(DC, @AControlOrigin) <> 0 then
|
||||
begin
|
||||
Dec(FFormOrigin.X, AControlOrigin.X);
|
||||
Dec(FFormOrigin.Y, AControlOrigin.Y);
|
||||
@ -434,7 +435,7 @@ begin
|
||||
if FSavedDC = 0 then
|
||||
begin
|
||||
FSavedDC := SaveDC(DC);
|
||||
FCanvas.Handle := FDC;
|
||||
FCanvas.Handle := DC;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user