designer: improve look of non-visual components

git-svn-id: trunk@18805 -
This commit is contained in:
paul 2009-02-23 08:34:04 +00:00
parent dfc003e02b
commit 1fdf7aac12
2 changed files with 10 additions and 24 deletions

View File

@ -2466,7 +2466,7 @@ end;
procedure TDesigner.DrawNonVisualComponents(aDDC: TDesignerDeviceContext);
var
i, j, ItemLeft, ItemTop, ItemRight, ItemBottom: integer;
i, ItemLeft, ItemTop, ItemRight, ItemBottom: integer;
Diff, ItemLeftTop: TPoint;
IconRect: TRect;
Icon: TBitmap;
@ -2491,27 +2491,13 @@ begin
with aDDC.Canvas do
begin
Pen.Width := 1;
Pen.Color := clWhite;
for j := 0 to NonVisualCompBorder - 1 do
begin
MoveTo(ItemLeft + j, ItemBottom - j);
LineTo(ItemLeft + j, ItemTop + j);
LineTo(ItemRight - j, ItemTop + j);
end;
Pen.Color := clBlack;
for j := 0 to NonVisualCompBorder - 1 do
begin
MoveTo(ItemLeft + j, ItemBottom - j);
LineTo(ItemRight - j, ItemBottom - j);
MoveTo(ItemRight - j, ItemTop + j);
LineTo(ItemRight - j, ItemBottom - j + 1);
end;
IconRect := Rect(ItemLeft + NonVisualCompBorder, ItemTop + NonVisualCompBorder,
ItemRight - NonVisualCompBorder, ItemBottom - NonVisualCompBorder);
IconRect := Rect(ItemLeft, ItemTop, ItemRight, ItemBottom);
Frame3D(IconRect, 1, bvRaised);
Brush.Color := clBtnFace;
//writeln('TDesigner.DrawNonVisualComponents A ',IconRect.Left,',',IconRect.Top,',',IconRect.Right,',',IconRect.Bottom);
FillRect(Rect(IconRect.Left, IconRect.Top,
IconRect.Right + 1, IconRect.Bottom + 1));
IconRect.Right, IconRect.Bottom));
if NonVisualCompBorder > 1 then
InflateRect(IconRect, -NonVisualCompBorder + 1, - NonVisualCompBorder + 1);
end;
if Assigned(FOnGetNonVisualCompIcon) then
begin