mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 15:16:25 +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);
|
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;
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user