designer: cleanup, formatting

git-svn-id: trunk@21223 -
This commit is contained in:
paul 2009-08-14 16:55:11 +00:00
parent ee68afcbd3
commit 61ae96cde3
2 changed files with 9 additions and 9 deletions

View File

@ -2526,8 +2526,7 @@ begin
IconRect := Rect(ItemLeft, ItemTop, ItemRight, ItemBottom); IconRect := Rect(ItemLeft, ItemTop, ItemRight, ItemBottom);
Frame3D(IconRect, 1, bvRaised); Frame3D(IconRect, 1, bvRaised);
Brush.Color := clBtnFace; Brush.Color := clBtnFace;
FillRect(Rect(IconRect.Left, IconRect.Top, FillRect(IconRect);
IconRect.Right, IconRect.Bottom));
if NonVisualCompBorder > 1 then if NonVisualCompBorder > 1 then
InflateRect(IconRect, -NonVisualCompBorder + 1, -NonVisualCompBorder + 1); InflateRect(IconRect, -NonVisualCompBorder + 1, -NonVisualCompBorder + 1);
end; end;

View File

@ -351,11 +351,12 @@ end;
function TDesignerDeviceContext.GetDCSize: TPoint; function TDesignerDeviceContext.GetDCSize: TPoint;
// returns the DC size // returns the DC size
begin begin
if not (ddcSizeValid in FFlags) then begin if not (ddcSizeValid in FFlags) then
GetDeviceSize(FDC,FDCSize); begin
Include(FFlags,ddcSizeValid); GetDeviceSize(DC, FDCSize);
Include(FFlags, ddcSizeValid);
end; end;
Result:=FDCSize; Result := FDCSize;
end; end;
function TDesignerDeviceContext.GetFormClientOrigin: TPoint; function TDesignerDeviceContext.GetFormClientOrigin: TPoint;
@ -377,7 +378,7 @@ var
begin begin
if not (ddcFormOriginValid in FFlags) then if not (ddcFormOriginValid in FFlags) then
begin begin
if not GetDCOriginRelativeToWindow(FDC, FForm.Handle, FFormOrigin) then if not GetDCOriginRelativeToWindow(DC, FForm.Handle, FFormOrigin) then
begin begin
// For some reason we cannot retrieve DC origin. It can happen for exmample // 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 // when DC is not controld DC but double buffer DC. Lets use another trick
@ -390,7 +391,7 @@ begin
end end
else else
FFormOrigin := Point(0, 0); FFormOrigin := Point(0, 0);
if GetWindowOrgEx(FDC, @AControlOrigin) <> 0 then if GetWindowOrgEx(DC, @AControlOrigin) <> 0 then
begin begin
Dec(FFormOrigin.X, AControlOrigin.X); Dec(FFormOrigin.X, AControlOrigin.X);
Dec(FFormOrigin.Y, AControlOrigin.Y); Dec(FFormOrigin.Y, AControlOrigin.Y);
@ -434,7 +435,7 @@ begin
if FSavedDC = 0 then if FSavedDC = 0 then
begin begin
FSavedDC := SaveDC(DC); FSavedDC := SaveDC(DC);
FCanvas.Handle := FDC; FCanvas.Handle := DC;
end; end;
end; end;