mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 10:39:31 +02:00
designer: improve look of non-visual components
git-svn-id: trunk@18805 -
This commit is contained in:
parent
dfc003e02b
commit
1fdf7aac12
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user